Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macintosh Newbie drastically needs help!


    HELP!!!!! I'm close to a nervous breakdown and need saving . . . .
    Just can NOT get the hang of PHP and seem to be hitting my head against a brick wall at every turn! Would appreciate some advice if at all poss . . the situation is as follows:

    I'm trying to put a live RSS feed on my site and have the code to do so. It is:
    <?php
    $olderror_reporting =error_reporting(0);
    include ("http://www.rssfeedreader.com/rss3/rss.php?url=http%3A%2F%2Fnews.google.com%2Fnews%3Fhl%3Den%26ned%3Dus%26ie%3DUTF-%26output%3Drss%26q%3Dpoker%2Chttp%3A%2F%2Fnews.search.yahoo.com%2Fusns%2Fynsearch%2Fcategories%2Fne ws_story_search_rss%2Findex.html%3Fp%3Dpoker%2Chttp%3A%2F%2Fsearch.msn.com%2Fnews%2Fresults.aspx%3Ff ormat%3Drss%26FORM%3DRSNR%26q%3Dpoker&newpage=1&chead=1&atl=1&desc=1&owncss=&eleminate=&auth=1&dts=1 &width=600&max=7&tlen=0&rnd=&bt=1.5&bs=Groove&nmb=&ntb=&naf=&nst=&nwd=0&nht=0&dlen=0&lstyle=4&lc=%23 CC0000&bg=%23FFFFFF&bc=%23000000&spc=&ims=&tc=%23000000&ts=10&tfont=Arial,+Helvetica,+Sans-serif&rf=".$HTTP_SERVER_VARS['SERVER_NAME'].$HTTP_SERVER_VARS['PHP_SELF']."&phpout=1");
    error_reporting($olderror_reporting);
    ?>

    Clearly just pasting this code into an html page in Rapid Weaver is not working.
    • I've changed the file extension in page inspector to: .php
    • Now, apparantly I need to do something on my web server??
    • The php is currently set to PHP 4 - does this need changing to PHP 5? But its also giving me the opton to turn 'register globals' on or ff and also 'display errors' . . . the same goes for the variosu extensions!

    The instructions that came with the script are as follows:

    "For Apache Servers Edit your .htacess with AddType application/x-httpd-php .htm .html Then Add the php code from the reader directly to your html pages

    For Apache Servers Edit your .htacess with either .htm server parsed .html server parsed or
    Addhandler application/x-httpd-php .html .php Then follow the directions below to use the php code from the reader with SSI Includes.For Apache Servers Edit your .htacess with AddType application/x-httpd-php .htm .html Then Add the php code from the reader directly to your html pages

    For Apache Servers Edit your .htacess with either .htm server parsed .html server parsed or
    Addhandler application/x-httpd-php .html .php Then follow the directions below to use the php code from the reader with SSI Includes."

    Which of course means nothing to me!! (I'm a former die hard dot Mac user - this is all a bit over my head right now!)
    I don't actually understand what .htaccess is. I found one file like that located in the 'stats' directory in my file manager . . .!!!????????

    Could someone pleeeeeeeeeeeeeze shed light on this nightmare in an 'idiot-proof' kind of way! lol It's frustrating as I've tried many times to use PHP but just dont know how to!!

    Thanks in advance :-)

    Sb

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,549
    Thanks
    8
    Thanked 1,095 Times in 1,086 Posts
    Do you have your own server, or is your website hosted by a webhost?

  • #3
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Its a website hosted by A Plus hosting . . .(who have been really unhelpful, hence I'll soon be changing!)

    Thanks

  • #4
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,549
    Thanks
    8
    Thanked 1,095 Times in 1,086 Posts
    OK ...

    Give us the link to the actual page that shows the RSS link that you want to read.

    I assume you have a website and you want an RSS feed from another site to appear on your web page? So you are interested in an RSS "Reader"?

    All of that Apache stuff you saw is for configuring your own server.
    Since you are using a webhost, you can't do that. But, I think the method
    you're using to display an RSS feed might be your problem, thus the question
    about showing us where you're getting the feed from.

  • #5
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Exactly! The site that I got the code from is: http://rssfeedreader.com/reader/
    There, I customized the RSS feed I wanted and they gave me the code in Java & PHP. I wanted to use PHP for SEO purposes (but its proving a nightmare!) Hope this helps a little.

  • #6
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,549
    Thanks
    8
    Thanked 1,095 Times in 1,086 Posts
    What is the RSS Feed that you want?

    It must be some XML link from a website somewhere?

    Don't worry about the actual PHP reader at this point, just let
    me see what the RSS feed looks like, where it's from.

  • #7
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

  • #8
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,549
    Thanks
    8
    Thanked 1,095 Times in 1,086 Posts
    OK ... so here's a way to do it, but you have some steps to take...

    Step 1:
    See the two attached files. The extensions are .txt so they could be
    attached. You need to copy these and change the extensions to .php
    (this forum won't allow any attachments with the extension of .php).

    Step 2:
    Upload both of these into your directory where your web page will be.
    "demo2.php" and "lastRSS.php"

    Step 3:
    "demo2.php" is a demo script that shows how the "lastRSS.php" reader works.

    Wherever you want your RSS feed to appear, you would insert that script
    into your webpage (and your page has the extension .php).

    See my working example: http://www.catpin.com/demo2.php

    Step 4:
    Now you'll have to customize how the thing looks. You can make it look
    like the rest of your site, and you can also change how many items it shows.
    In the example, it shows the first 5 items only.

    The example also only shows one feed ... you can duplicate the script to
    show several feeds in various places on your web page.

    Step 5:
    It's difficult to actually show you how to customize it and insert it into
    your web page because we can't see your web page. That's why I am
    providing the example page (demo2.php) so you can see how it is coded.

    I realize you're new to PHP, but this is the best I can do using this forum.

    You may want to find an experienced coder to enter your website and
    help you out ... if you can't figure it out. And giving us a link to your
    website would also be helpful.
    Attached Files Attached Files

  • #9
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thankyou soooo much for taking the time to reply. I really appreciate it :-) I'm going to try and work this out rather than get someone to do it - its more rewarding :-) Right - so I'm going to work through your suggestions and I'll let you know how I get on (may take me a while ;-))
    The link to my site is: hhtp://www.fatjackspokershack.com

    Thanks again


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •