WordPress.org

Ready to get started?Download WordPress

Forums

How can I put blog feeds on my website, w/o use of PHP, Javascript or iFrames (24 posts)

  1. ilovetheweb
    Member
    Posted 8 years ago #

    How can I put blog feeds on my website.

    I went to http://www.feedforall.com and downloaded the
    free php file which turns your RSS feeds into HTML so
    you can put it on your website.

    The script works great, but I have to copy and past this long URL
    into my browswer in order for me to see my updated blog content.

    This is the problem. I want to have other people put my blog
    content on their site and I could use:

    JAVASCRIPT
    <script language="JavaScript" src="http://www.MYDOMAINNAME.com/rss2html.php?XMLFILE=MYDOMAINNAME/wp-rss.php&TEMPLATE=http://www.MYDOMAINNAME/sample-template.html&MAXITEMS=15"></script>

    or this:

    FRAMES
    <iframe src="http://www.MYDOMAINNAME.com/rss2html.php?XMLFILE=MYDOMAINNAME/wp-rss.php&TEMPLATE=http://www.MYDOMAINNAME/sample-template.html&MAXITEMS=15"></iframe>

    to put it on my site, but search engines do not spider
    frames and javascript.

    I was told that I could even use this:

    PHP
    <?php
    include 'http://www.MYDOMAINNAME.com/rss2html.php?XMLFILE=MYDOMAINNAME/wp-rss.php&TEMPLATE=http://www.MYDOMAINNAME/sample-template.html&MAXITEMS=15';
    ?>

    But not everyone has a server that uses php.

    How can I have other people put my blog content on their website
    without the use of PHP, iFrames or JavaScript.

    Can anyone help?

  2. Kafkaesqui

    Posted 8 years ago #

    Short of them actually copying and pasting it into their page?

    About the only options you've left open are a web service to import the rss (but of these I can't think of one that doesn't require at least javascript), or a local cgi application that pulls the rss feed into the page. I don't know of a mechanism that would do what you want in a straight HTML document without some form of scripting or "document in document" handling.

  3. ilovetheweb
    Member
    Posted 8 years ago #

    How would I do this using Perl or Cgi?

  4. tomhanna
    Member
    Posted 8 years ago #

  5. ilovetheweb
    Member
    Posted 8 years ago #

    Thanks, but how do I install this so that it looks just like a regular html page?

    I want other people to be able to put my feeds on their website.

  6. RustIndy
    Member
    Posted 8 years ago #

    Have a cron job running on your server every, maybe, 15 minutes, that runs a script that takes your RSS feed and writes an HTML version of it. Then give people the location of that HTML file and they can include it on their websites using server-side includes or an iframe or whatever.

  7. davidchait
    Member
    Posted 8 years ago #

    I'm confused. You say you want to put feeds on YOUR website as the description of this question, then ask about putting YOUR feeds on OTHER sites. Which is it?

    Yes, if they have vanilla HTML, they either need to pull it in via frame, javascript, or some kind of IMG insertion tricks. If they have PHP, they can use something like CG-Feedread to aggregate your feed.

    If YOU want feeds on your site, same thing applies. If you can use PHP, something like CG-Feedread will allow you to pull in feeds from other sites and display them on a php page of your site (could be within your WP pages, or a separate page).

    Maybe you need to describe in better detail exactly what your objectives are, since so far it's been pretty confusing...

    -d

  8. ilovetheweb
    Member
    Posted 8 years ago #

    <?php
    include 'http://www.MYDOMAINNAME.com/rss2html.php?XMLFILE=MYDOMAINNAME/wp-rss.php&TEMPLATE=http://www.MYDOMAINNAME/sample-template.html&MAXITEMS=15';
    ?>
    even this. BUT USING THIS I CAN ONLY PUT OTHER FEEDS ON MY PAGES.
    <?php
    require_once '/hsphere/local/home/MY_SERVER_USERID/MYDOMAINNAME.com/carp/carp_gpl/carp/carp.php';
    // Add any desired configuration settings below this line using "CarpConf" and other functions
    CarpCacheShow('http://www.MYDOMAINNAME/wp-rss.php');
    ?>

  9. ilovetheweb
    Member
    Posted 8 years ago #

    Let's say this is SOMEONE ELSES web page.

    The URL is: http://www.THEIRDOMAINNAME.com/page1.html

    +++++++++++++++++++++++++++++++++++
    The content would be up here with maybe
    a graphic or two and
    so on and so on and so on.

    HERE I want others to be able to put my RSS feed
    so that everything can be read, and also picked up
    by the search engines.
    +++++++++++++++++++++++++++++++++++

    I have found I can do this with php by using these codes:

    http://wordpress.org/support/topic/31759#post-179574

    The problem I am running into is this?

    Can you put in a php code into a regular webpage that has a
    .html or .htm extention? If so, how do you do this?

    I have 10 people that want to put up my RSS feed on their website
    because I update it daily with excellent content. These people have
    web servers that do not have php. The search engines
    I have found will even spider all 10 of the people's websites often
    if not daily, giving there webpage a higher ranking due to fresh
    content.

    This inturn will give me more traffic to my blog.

    But how to I put this:
    http://wordpress.org/support/topic/31759#post-179574

    put PHP CODE
    into a .html or .htm extention web page.

    If I can't put it into a .html or .htm extention webpage.

    I was thinking I could use some sort of CGI code.

    I do not want to use Javascript (Java) or iFrames because
    these are not read by search engine spiders.

    How can I do this?

    ======= RUSTY =============
    What is a cron job. Can you show me an example of one?

    THANK YOU so much in advance.

    Did I do a better job at explaining what I am looking for?

  10. ilovetheweb
    Member
    Posted 8 years ago #

    I found a good URL that explains what I am trying to
    do:

    PHP scripts can be embedded in HTML pages.
    http://www.tqnyc.org/tutorial/how-to_php.php

    So how do I put this code in my html pages:
    http://wordpress.org/support/topic/31759#post-179574

  11. Kafkaesqui

    Posted 8 years ago #

    PHP embedded in HTML is still PHP, it just makes use of standard HTML to display the content to a browser. In other words, a PHP script and an HTML document with embedded PHP are effectively the same thing, and the web server still must support PHP for this to work.

  12. RustIndy
    Member
    Posted 8 years ago #

    If their host supports server-side includes, then they can include a file (CGI, PHP, ASP, whatever) from your site.

    For example, if their site is on a windows server, they can add the following line to their site:

    <!-- #include file="http://www.MYDOMAINNAME.com/rss2html.php?XMLFILE=http://www.MYDOMAINNAME.com/wp-rss.php&TEMPLATE=http://www.MYDOMAINNAME.com/sample-template.html&MAXITEMS=15" -->

    I don't offhand remember the syntax for a server-side include under Apache, but it'd be easy enough to look up.

    Supporting "server-side includes" is something that is up to the web server software itself - no scripting language is needed on their website, just the website where the php file is being called from (in this case, your site).

  13. ilovetheweb
    Member
    Posted 8 years ago #

    Thank you for your quick reply:

    So how do I put this PHP code in my webpage which is an
    .html extention

    and make it show up?
    http://wordpress.org/support/topic/31759#post-179574

  14. RustIndy
    Member
    Posted 8 years ago #

    A "cron job" is a scheduled job on an operating system. For instance, you could write (or find) a script that would run read your RSS feed and write the results to an HTML file. Then schedule it using Cron (or the Windows Task Scheduler if you're hosted on a Windows server) to run every 15 minutes, or hour, or 6 hours, or whatever.

    Using the technique above (server-side includes) has one drawback - every time their site is viewed, your site will execute the script. This could create an unwanted load on your server, depending on how busy their sites are. If you use the cron job to write an HTML file and they include the HTML file instead of the script, then your server only runs the script according to the cron schedule, which would be a lot easier on your server.

  15. RustIndy
    Member
    Posted 8 years ago #

    You don't need PHP to do an include command. Just find out whether they are using an IIS or Apache server (or whatever server software - there are quite a few web server programs out there) and find out the syntax for a "server-side include" command. The example I gave will work on a Windows server running the IIS web server.

  16. ilovetheweb
    Member
    Posted 8 years ago #

    Here is my server information:
    PHP Version 4.3.11
    --------
    System FreeBSD web2.worria.com 5.3-RELEASE-p8 FreeBSD 5.3-RELEASE-p8 #0: Fri Apr 8 00:31:46 CDT 2005 root@web2.worria.com:/usr/obj/usr/src/sys/QUOTA i386
    -------
    Build Date Apr 8 2005 20:27:28
    -------
    Configure Command './configure' '--localstatedir=/var/hsphere/php' '--with-apxs=/hsphere/shared/apache/bin/apxs' '--with-openssl=/usr' '--with-zlib=/usr' '--with-zlib-dir=/usr' '--with-bz2=/usr/local' '--enable-calendar' '--with-jpeg-dir=/usr/local' '--enable-ftp' '--with-gd' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--with-png-dir=/usr/local' '--with-gettext=/usr/local' '--with-imap=/hsphere/shared' '--with-mysql=/usr/local' '--with-pgsql=/usr/local' '--with-curl=/hsphere/shared' '--with-curlwrappers' '--with-mhash=/usr/local' '--with-iconv=/hsphere/shared' '--enable-sockets' '--with-zip=/usr/local' '--enable-versioning' '--enable-track-vars' '--enable-trans-sid' '--enable-bcmath' '--enable-mbstring' '--disable-debug'
    -------------
    Server API Apache
    Virtual Directory Support disabled
    Configuration File (php.ini) Path /usr/local/Zend/etc/php.ini
    PHP API 20020918
    PHP Extension 20020429
    Zend Extension 20021010
    Debug Build no
    Thread Safety disabled
    Registered PHP Streams php, http, ftp, https, ftps, compress.bzip2, compress.zlib
    ----------
    This program makes use of the Zend Scripting Language Engine:
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies with Zend Extension Manager v1.0.6, Copyright (c) 2003-2004, by Zend Technologies with Zend Optimizer v2.5.7, Copyright (c) 1998-2004, by Zend Technologies

    NEED ANYTHING ELSE?

  17. ilovetheweb
    Member
    Posted 8 years ago #

    I tried just putting this on my webpage and it did not work.
    http://wordpress.org/support/topic/31759#post-179706

  18. ilovetheweb
    Member
    Posted 8 years ago #

    Any new info?

  19. RustIndy
    Member
    Posted 8 years ago #

    Well according to the Apache documentation, a server-side include is not going to work for you - an included file must exist in the same website as the file that called it.

    And I *did* say that the example I gave should work on IIS - it wasn't meant to work on Apache.

    Your friends will need to find some other method of including your RSS feed on their pages. iframe is probably the best way overall, but if you want search engines to be able to see your links, you're limited to having them use a CGI script. Sorry.

  20. tomhanna
    Member
    Posted 8 years ago #

    Are you sure about using SSI? I can't even get a file to include properly from a different domain name on the same server, let alone a completely separate site. Not that it's important - I'm rewriting all my old HTML pages as PHP pages anyway.

  21. ilovetheweb
    Member
    Posted 8 years ago #

    How can I use a CGI script to do this?

    How can I incorp a PHP code into a html page?

  22. gregcaulder
    Member
    Posted 8 years ago #

    Im bit confused with the javascript.

    JAVASCRIPT
    <script language="JavaScript" src="http://www.MYDOMAINNAME.com/rss2html.php?XMLFILE=MYDOMAINNAME/wp-rss.php&TEMPLATE=http://www.MYDOMAINNAME/sample-template.html&MAXITEMS=15"></script>

    What do i put in the XMLFILE= and teh wp-rss.php&TEMPLATE to det everyhing to work correctley?

    All i want it the java code and nothing else, i dont want my whole pages to be php.

    Greg

  23. vkaryl
    Member
    Posted 8 years ago #

    ilovetheweb: you can't. An html page is by definition static. You can't make a plain html page do anything but display.

    In order to become dynamic, html pages must be saved with the extension .php. Then you're off and running....

    gregcaulder: whyever not? The difference between html and php as a file extension is nothing more than the ability to "execute" other code in the case of a php page. Parsing the php files adds a tiny increment to load time - infintesimal for the most part.

    I've been using .php files for a couple of years. I'm not seeing anything detrimental.

  24. gregcaulder
    Member
    Posted 8 years ago #

    vkaryl: I dont think you understood what i was asking. I just want a java string to help display my RSS feed from my blog. Noting to do with PHP, noting to do with ASP, and noting to do with CGI. I am currentley doing what i want from a 3rd party to read my RSS feed and display it but i have little controll over it.

    Only to do with HTML and that is it.

    Greg

Topic Closed

This topic has been closed to new replies.

About this Topic