hey guys, i will probably get flamed out of my skull for this, but i need help and have no where else to turn.

i am trying to develop a BB hack for a friend. the purpose of this hack would the ability to search for a movie using the IMDB, and then displaying the results in a post. i found what i THOUGHT would be a very good script/class to use for this task

www.counter-clan.net/imdb

however, when i try to use this i get nothing, and i know it's setup correctly. the people that made this script havn't been any help yet, so I was wondering if someone could recommend another class of code to use imdb or perhaps a way to get this one working... thx =)

btw - i will send someone a box of twinkies if they help me with this, no joke, i have like 200 of them in my house

    What version of PHP are you using? - what version was it written for? - what platform? - which bb? which bb version?

    i know it's setup correctly

    - isn't really much help.

    Have you tried posting on their forums?
    http://www.counter-clan.net/imdb/phpbb/

      5 months later

      since imdb.com has done some changes that makes in impossible to use fopen, I wrote this script to access the pages

      <?
      $fp = fsockopen ("www.imdb.com", 80, $errno, $errstr, 30);
      if (!$fp) {
          echo "$errstr ($errno)<br>\n";
      } else {
          fputs ($fp, "GET /Title?$imdb HTTP/1.0\r\nHost: [url]www.imdb.com\r\nUser-Agent:[/url] Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)\r\n\r\n"); // You must send user-agent..
          while (!feof($fp)) {
              $tmp = stripslashes(fgets($fp,4096));
              $tmp = ereg_replace('<a href="/', '<a href="http://uk.imdb.com/', $tmp); // make the links absolute..
      
          $buf .=$tmp;
      }
      fclose ($fp);
      }
      echo $buf;
      
      
      ?>
      
        8 months later

        so what does that script do? id also liek a way of adding stuff from IMDB to my personal movie collection as it would save me loads of time.
        Thanks
        /matt
        p.s. please pm me

          Well, it reads the contents of the page into $buf so you can extract the data from $buf with some preg's.

          You'll have to include the imdbnumber of the movie in $imdb.

          $genres = preg_replace("i/<a href="\/Sections\/Genres\/.*/\">(.*)</a>", "\\0", $buff); // or something like that gives you the genres.

          Check the html code at imdb.com to find out more.

            Write a Reply...