Results 1 to 3 of 3

Thread: Advanced rss ticker and personal rss feeds

  1. #1
    Join Date
    Aug 2013
    Location
    PGH PA US
    Posts
    10
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Advanced rss ticker and personal rss feeds

    1) Script Title: advanced rss ticker

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...rsstickerajax/

    3) Describe problem:
    I recently downloaded this script in order to have an rss ticker on my personal website. In testing things out via the demo, I can get everything to work when using the CNN and BBC example feeds that came with the code package. However, when I try to add one of my own feeds to the feed key array, the demo.htm ticker stays stuck at "Initializing ticker..."

    Obviously, I'm thinking this has something to do with how my own feed is written. The feed is a php script that parses an espn bottom line url into rss 2.0/xml, and the rss ticker would display things as a live scores ticker. The code for the feed is:

    PHP Code:
    <?



    function get_content($url)



    {


       
    $ch curl_init();






       
    curl_setopt ($chCURLOPT_URL$url);



       
    curl_setopt ($chCURLOPT_HEADER0);







       
    ob_start();






       
    curl_exec ($ch);



       
    curl_close ($ch);



       
    $string ob_get_contents();






       
    ob_end_clean();




      

     return 
    $string;











    header("Content-Type: text/xml");



    echo 
    "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n\n";



    echo 
    "<rss version=\"2.0\">\n\n";



    echo 
    "<channel>\n";


    echo 
    "<title>MLB Scores</title>\n";



    echo 
    "<link>http://www.mlb.com</link>\n";



    echo 
    "<description>MLB Scores</description>\n";



    echo 
    "<language>en-us</language>\n";




    $content get_content ("http://sports.espn.go.com/mlb/bottomline/scores");





    $content_array=explode("&"$content);



    $scorearray = array();



    $i=0;



    foreach(
    $content_array as $content) {



        if (
    strpos($content"_left")) {



            
    $equalpos strpos($content"=");



            
    $end strlen($content);



            
    $title substr($content, ($equalpos+1), $end);



            
    $title str_replace("^"""$title);



            
    $title str_replace("%20"" "$title);



                    
    $title str_replace("()","(DELAY)"$title);



                    
    $title str_replace(" INNINGS",""$title);



            
    $scorearray[$i]["title"] = $title;







        }



        if (
    strpos($content"_url")) {



            
    $equalpos strpos($content"=");



            
    $end strlen($content);



            
    $url substr($content, ($equalpos+1), $end);



            
    $url str_replace("^"""$url);



            
    $url str_replace("%20"" "$url);



            
    $scorearray[$i]["url"] = $url;



                    
    $i++;





        }



    }






    foreach(
    $scorearray as $score) {



        echo 
    "<item>\n";



        echo 
    "<title>".$score["title"]."</title>\n";



        echo 
    "<link>".$score["url"]."</link>\n";



        echo 
    "</item>\n";



    }






    echo 
    "</channel>\n";



    echo 
    "</rss>\n";



    ?>
    Anyone have any insight as to why things aren't working? Thanks!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,920
    Thanks
    43
    Thanked 3,187 Times in 3,151 Posts
    Blog Entries
    12

    Default

    Because that material is probably copyrighted, this might be an illegal request. If it is, we're not allowed to help you.

    I suppose I could tell you, just in general that you could validate the feed to gain insight:

    http://validator.w3.org/feed/

    I'm locking this thread pending a review.
    - John
    ________________________

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

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,920
    Thanks
    43
    Thanked 3,187 Times in 3,151 Posts
    Blog Entries
    12

    Default

    OK, we've reviewed this matter and it appears that the file on ESPN that you're using is intended only for use by their free branded Bottom Line widget:

    http://espn.go.com/bottomline/

    It can be put on your website (use IE or Firefox to view link, but the widget works in most browsers):

    http://espn.go.com/bottomline/faq.html#gen1

    So I would suggest using it instead of grabbing the info for it, which is a violation of ESPN's terms of service. As such we are not allowed by our forum's rules to assist you with doing that anyway.
    - John
    ________________________

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

Similar Threads

  1. Advanced RSS Ticker Multiple Feeds
    By rss4all in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 03-20-2013, 03:22 PM
  2. How to put an xml feeds on my personal web page?
    By nihilater in forum Looking for such a script or service
    Replies: 0
    Last Post: 09-20-2009, 05:20 PM
  3. Replies: 2
    Last Post: 06-08-2009, 05:50 PM
  4. Advanced RSS Ticker Hung on "intilizing Ticker"
    By slamothe in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 01-21-2009, 05:15 PM
  5. Advanced RSS Ticker - Stuck on "Initializing ticker"
    By unifem in forum Dynamic Drive scripts help
    Replies: 5
    Last Post: 10-16-2006, 01:40 AM

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
  •