imdb

Help
2005-01-01
2013-05-30
  • Christian dela Cruz

    <?php

    include("Snoopy.class.php");

    $snoopy = new Snoopy();
    $url = "http://www.imdb.com/";
    $snoopy->agent = "Mozilla/8.0";
    if($snoopy->fetch($url))
    {
            $imdb_html = $snoopy->results;
            print_r($snoopy->$headers);
    }
    else
    {
            $imdb_html =  "error fetching document: ".$snoopy->error."\n";
    }

    echo $imdb_html;

    ?>

    This scipt does'nt work. It always gives the following:

    error fetching document: connection failed (111)

    Why? How can I make it work in imdb?

     
    • Christian dela Cruz

      anyone? please!

       
    • Monte Ohrt

      Monte Ohrt - 2005-01-05

      This identical script works for me, the front page of imdb returns as the result in $imdb_html.

       
    • Christian dela Cruz

      This is the error:
      Warning: fsockopen(): unable to connect to www.imdb.com:80 in /home/groups/d/dv/dvdmanager/htdocs/Snoopy.class.php on line 1126
      error fetching document: connection failed (111)

       
      • Monte Ohrt

        Monte Ohrt - 2005-01-05

        Have you tried it on a local computer? I'm not sure why this doesn't work with sourceforge, could you try a simple PHP script such as:

        <?php readfile('http://www.imdb.com/'); ?>

        and see what you get?

         
    • Christian dela Cruz

      Yes I tried it locally and it does'nt work. Same result w/ imdb.
      readfile only work when I access my local website. It does'nt work if I access other websites.

       
    • Christian dela Cruz

      Can I see your local phpinfo? If not, can you try to diff sourceforge phpinfo w/ your local phpinfo?

       
    • Christian dela Cruz

      funny the script worked on my local windows webserver. any ideas why?

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks