Results 1 to 4 of 4

 

Thread: Pulling data from another site - help!

  1. #1
    Azam.net's Avatar
    Azam Marketing

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Bloomsbury, London
    Posts
    3,278
    Thanks
    211
    Thanked 71 Times in 52 Posts


    Have been in contact with the guys at this site and they said it is OK for me to copy the US and UK Box Office charts for my site.

    However, they don't have the time to set up anything from their end to automate the process.

    It would be time-consuming for me to update the charts manually on my site by cutting-and-pasting from their site. Therefore I was wondering if any of the gurus out there knew of a method I could use to copy their charts to my site. Is there any kind of script I could use?

    A million thanks.
    Azam Marketing

    Read Azam.info, the most regularly updated UK affiliate marketing blog - click here

  2. #2
    Avoiding real work

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Buckinghamshire
    Posts
    1,373
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you're using PHP then you should be able to adapt Aquanuke's Amazon Top Ten script to do the job for you.
    Those who can do, those who can't talk about it

  3. #3
    Azam.net's Avatar
    Azam Marketing

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Bloomsbury, London
    Posts
    3,278
    Thanks
    211
    Thanked 71 Times in 52 Posts
    That's a good idea, Ian. Am useless at PHP, but I will try to fiddle with Aquanuke's script.

    Will report back to let you know how it goes.

    Thanks
    Azam Marketing

    Read Azam.info, the most regularly updated UK affiliate marketing blog - click here

  4. #4
    Registered User

    Status
    Offline
    Join Date
    Aug 2003
    Posts
    126
    Thanks
    1
    Thanked 1 Time in 1 Post
    Nadeem,

    hopefully this should work for you.

    PHP Code:
    <?php

    $handle 
    fopen("http://fantasyfilmleague.com/""rb");
    $contents '';
    while (!
    feof($handle)) {
      
    $contents .= fread($handle8192);
    }
    fclose($handle);

    preg_match_all('/[?<=<h2>.. Box Office<\/h2>(.*)]<ol>(.*)<\/ol>/sUi'$contents$out);

    $uk_boxoffice=str_replace("/film.php","http://fantasyfilmleague.com/film.php",$out[0][0]);
    $us_boxoffice=str_replace("/film.php","http://fantasyfilmleague.com/film.php",$out[0][1]);

    echo 
    "<h2>UK Box Office</h2>".$uk_boxoffice;
    echo 
    "<hr>";
    echo 
    "<h2>US Box Office</h2>".$us_boxoffice;

    ?>
    David



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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
  •  
To Top

Content Relevant URLs by vBSEO 3.5.0 RC2