Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Can't get Pausing RSS scroller to work.

  1. #1
    Join Date
    May 2012
    Posts
    11
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Can't get Pausing RSS scroller to work.

    Script Title: Pausing RSS scroller

    Script URL: http://www.dynamicdrive.com/dynamici...ller/index.htm

    I'm building a website from local machine(the only way I can at the moment), I downloaded the files unzipped and tried the Demo out... it's not working it returned the message: "I give up trying to fetch RSS feed.".

    Then I thought, it's PHP, I need to install something dont I? So I have downloaded and installed XAMPP and it says PHP should be working now but the Demo is still not functioning. The files were unziped into the websites main directory as is, so the URLs should be correct and they looked fine when I checked them.

    I then went ahead with the setup instructions 1-4(adding the RSS feed I want and adding the domain to the allowed domains ect) but it still comes back with the same message.

    I've spent ages trying to get this to work, it seems a nice script to have, so as a last resort before giving up on it I thought I'd ask here first.

    Does anyone have any idea what could be wrong?
    Last edited by Metalartin; 05-02-2012 at 02:21 PM.

  2. #2
    Join Date
    May 2012
    Posts
    11
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Ok I see where I was going wrong... never used XAMPP before, ok after moving the directory to XAMPPS "htdocs" directory and typing "http://127.0.0.1/Website/demo.htm" manually in my browser, then updating the links, the message has changed.

    Now it returns: "This domain isn't authorized to show scroller.
    I give up trying to fetch RSS feed."

    *.htm
    Code:
    <script type="text/javascript">
    new rsspausescroller("cnn", "pscroller2", "rssclass", 3000, "_new", "date+description")
    </script>
    rsspausescroller.js
    Code:
    //URL to "scrollerbridge.php" on your server (use absolute path for syndication):
    var bridgepath="//URL to "scrollerbridge.php" on your server (use absolute path for syndication):
    var bridgepath="http://127.0.0.1/Website/lastrss/scrollerbridge.php"
    scrollerbridge.php
    Code:
    // include lastRSS
    include "lastRSS.php"; //path to lastRSS.php on your server relative to scrollerbridge.php
    
    // Create lastRSS object
    $rss = new lastRSS;
    $rss->cache_dir = 'cache'; //path to cache directory on your server relative to scrollerbridge.php. Chmod 777!
    $rss->date_format = 'M d, Y g:i:s A'; //date format of RSS item. See PHP date() function for possible input.
    $rss->cache_time = 1800; //Global cache time before fetching RSS feed again, in seconds.
    
    // Define your list of RSS URLs- "RSS_id"=> "URL to RSS feed"
    $rsslist=array(
    "cnn" => "http://rss.cnn.com/rss/cnn_topstories.rss",
    "dynamicdrive" => "http://www.dynamicdrive.com/export.php?type=new",
    "falingehub" => "http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=falingehub",
    );
    
    //Domains that are authorized to display scroller:
    //Seperate multiple domains each with a comma (",")
    //For example: $allowedDomains="dynamicdrive.com, javascriptkit.com"
    //OR enter a blank string to allow any domain (ie: for RSS feed syndication):
    $allowedDomains="cnn.com, dynamicdrive.com, twitter.com";
    
    ////Beginners don't need to configure past here///
    Have I entered the domains correctly? Perhaps there is a setting in XAMPP preventing it from functioning fully if the code here is good? Anyone able to help?
    Last edited by Metalartin; 05-02-2012 at 08:52 PM.

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The main problem there is that you're not allowing your own domain. Leave that blank, change:

    PHP Code:
    $allowedDomains="cnn.com, dynamicdrive.com, twitter.com"
    to:

    PHP Code:
    $allowedDomains=""
    There could also be other problems though. That script is way outdated and doesn't handle UTF-8 well. It also has other problems. Here's my latest revision:

    Attachment 4448
    Last edited by jscheuer1; 05-03-2012 at 05:32 PM. Reason: update comments in archive
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Metalartin (05-09-2012)

  5. #4
    Join Date
    May 2012
    Posts
    11
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    The main problem there is that you're not allowing your own domain. Leave that blank, change:

    PHP Code:
    $allowedDomains="cnn.com, dynamicdrive.com, twitter.com"
    to:

    PHP Code:
    $allowedDomains=""
    There could also be other problems though. That script is way outdated and doesn't handle UTF-8 well. It also has other problems. Here's my latest revision:

    Attachment 4448
    Thankyou for replying.

    Yep I started off with that value blank but took the return value to mean I needed them in there, I've since tried using UniServer instead(alot more user friendly) aswell as hosting the demo files on my webspace which I've since found out does support PHP now.

    I will take a look at your updated files, thanyou for that.

    I'm wondering if the problem might be a little less obvious, may be a guess but I'm wondering if there is block on my end somewhere along the line preventing some functions, could my ISP be getting in the way of anything? Im logged on in an administrator account but not the default one(read its better not to use that all the time). I found the PHP file linked from the article and used that link in my local rsspausescroller.js and it worked instantly.

    This PHP stuff is tricky no? and to think I was thinking of adding dynamic update features to some of the pages lol.

  6. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    PHP can be tricky, but like HTML or javascript, once you understand the basics, it's fairly easy to do simple things and also fairly easy to install a working example of more complex things such as the archive I attached - it's fully functional as is.

    I use WAMP as a local PHP host - it's not even live on the web, but it does have access to the internet, which is very similar to XAMP so, unless like you speculate, there's some problem with your ISP, it should be fine.

    Double check that your XAMP local host server is working though. Make up a file, call it info.php:

    PHP Code:
    <?php
    phpinfo
    ();
    ?>
    and put it on your XAMP server, navigate to it. It should list a lot of information about the PHP version in use. If that works, test that you have access to the internet via your XAMP server. Make another file, call it external.php:

    PHP Code:
    <?php
    include 'http://www.google.com/';
    ?>
    It should show you the Google home page. Images will be missing though because their paths are wrong.

    If that works, then there shouldn't be any problems.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Metalartin (05-09-2012)

  8. #6
    Join Date
    May 2012
    Posts
    11
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Hi again, I tried all I could think of and.... well I'm well and truly stumped as to what the problem is seems like most people can just edit the paths and it works except me.

    Im using UniServer(easier to configure than XAMP, I've tried changing the the short open tags etc.) it showed the google page fine when browsing from local machine.

    I also removed the read only rights to all the files in lastrss' directory. I did notice that there are files in the cache folder(confirmed by deleting and refreshing page) so that means the paths are right does it not? Yet it displays it gives up trying to fetch the RSS feed still.

    I've since uploaded both versions of the demo to my webspace for you to look at if you have the time. Atleast if I can get it working on there, theres a good chance I can get it running on what ever server the site ends up on.

    Original Demo from Article Link

    Updated Simplepie version link

    If I cant do that I suppose there's the gajax rss pausing scroller which I've tried but it needs a Key if Im understanding right the page to get the key is gone, plus we don't know which server/address it will be on yet either. For now I have backed up the file with pausing Scroller code in and placed a crappy rsspump static one that doesnt seem to refresh let alone scroll, it's better than nothing but its hopefully a temporary measure.
    Last edited by Metalartin; 05-04-2012 at 09:00 AM.

  9. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    On the simplepie link in your post, the simplepie/simplepie.inc and simplepie/scrollerbridge.php files are 404 Not Found. And I thought you said that your server wasn't PHP enabled. It won't work under those circumstances. If that's a different server or you've enabled PHP on it, you need to upload the the simplepie folder and its contents to the server.

    Similarly on the server for the lastRSS version, the lastrss/lastRSS.php and lastrss/scrollerbridge.php files are 404 Not Found.

    On XAMP, with the simplepie version, I inadvertently left two files in the cache. They should be removed, but probably won't hurt anything. They are:

    c1385094608a6ceb6b8a3d25a2a8ae2e04c3ebd2.spc

    and:

    eefa557114bed3785cb5d2860eb7fb4e347ac960.spc

    If those are the two files you have, they were already there.

    About the gajax rss pausing scroller, the key is no longer required. Where it says to put:

    Code:
    <script type="text/javascript" src="http://www.google.com/jsapi?key=YOUR-API-KEY"></script>
    All you need is:

    Code:
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Metalartin (05-09-2012)

  11. #8
    Join Date
    May 2012
    Posts
    11
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Hi jscheuer1,

    I was a little tired when I wrote that post so maybe I wasnt that clear(still am really, too many late nights recently).

    Yes PHP is enabled on virginmedia, I've uploaded an info PHP if thats any use to you. Also its weird but I got that error too trying to browse to the files(they must have some odd permission settings, everything looks ok in the FTP client but that requires password obviously), they are deffinately there though, two directories named rss1 and rss2 for each version. I suppose the error message on its own is not much good?

    I deleted the files you mentioned in the cache first, then ran it again and two new ones were put in there, this happened on both versions of the demo if I remember rightly, which suprised me.

    Since it seems subdirectories on my webspace have special permission I have put everything in root for the simplepie version for you. It was the original file that came back with this message:

    "Sorry: It's not possible to reach RSS file http://www.dynamicdrive.com/export.php?type=new
    I give up trying to fetch RSS feed."
    This seems more promising as it sounds to me like it nearly finnished reading the PHP script(isn't that value/argument near the bottom?).

    Info.php (note this site wont be going on my webspace its for someone else, they did ask for an rss feed of their twitter at the top too).

    Demo2 all in htdocs root

    edit:
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    Yep I saw that message about not needing keys but after trying that link in the code and it not working I'd assumed the one in the article used a different version that still requires keys(it says some still require them too). To be honest I'd much rather have this script but I will have a proper go at the gajax scroller tomorrow if I cant find a solution tonight to the problems Im having with it.
    Last edited by Metalartin; 05-04-2012 at 05:22 PM.

  12. #9
    Join Date
    May 2012
    Posts
    11
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Ah well after moving the files it and running it, it seems like trying to run the whole lot in the same directory is even worse, no cache files created.

    Heres two cache files I've just got from localhost with Uniserver though:

    1: rsscache_4a557f2f685dba25493c4f53092d421c = 10.9 KB
    2: rsscache_eaa0bf19ea33700ed447204239c28d2e = 8.57 KB

    Since I cant upload them I thought I'd post the first part of the code for 1 of them here if it helps(let me know if this isnt allowed and I will delete it):

    Code:
    a:14:{s:8:"encoding";s:10:"ISO-8859-1";s:5:"title";s:7:"CNN.com";s:4:"link";s:39:"http://www.cnn.com/?eref=rss_topstories";s:11:"description";s:124:"CNN.com delivers up-to-the-minute news and information on the latest top stories, weather, entertainment, politics and more.";s:8:"language";s:5:"en-us";s:9:"copyright";s:35:" 2012 Cable News Network LP, LLLP.";s:13:"lastBuildDate";s:23:"Jan 01, 1970 1:00:00 AM";s:11:"image_title";s:7:"CNN.com";s:9:"image_url";s:67:"http://i2.cdn.turner.com/cnn/.element/img/1.0/logo/cnn.logo.rss.gif";s:10:"image_link";s:39:"http://www.cnn.com/?eref=rss_topstories";s:11:"image_width";s:3:"144";s:12:"image_height";s:2:"33";s:5:"items";a:6:{i:0;a:5:{s:5:"title";s:42:"Possible breakthrough for Chinese activist";s:4:"link";s:66:"http://rss.cnn.com/~r/rss/cnn_topstories/~3/_K5ftN95XRA/index.html";s:11:"description";s:1421:"The State Department says Chen Guangchen has been offered a fellowship at a university in the U.S. and that China has indicated it will approve his travel documents.&lt;div class="feedflare"&gt;
    Edit: The files created on my webspace are much smaller suggesting the script ends alot sooner than on from localmachine, the only thing either file contained was: "b:0;" Then blank.
    Last edited by Metalartin; 05-04-2012 at 05:45 PM.

  13. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    So you're saying it's working on the local machine?

    Either way, it seems as though one or more of the files on the server are either missing or don't have the proper permissions set.
    Last edited by jscheuer1; 05-05-2012 at 05:10 AM. Reason: detail
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  14. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Metalartin (05-09-2012)

Bookmarks

Posting Permissions

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