SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Jun 2001
    Location
    Australia
    Posts
    676
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    get results from google/yahoo

    Hi guys, Im trying to get the page content on the url using fopen and fread.
    But it only gets the top 5000 characters of the pages I need.

    Any help would be great.
    PHP Code:
    $url http://search.yahoo.com/search?p=web+services&fr=FP-tab-web-t&toggle=1&ei=UTF-8;
     
    $open = @fopen("$url""r");
    $read fread($open10000);
    fclose($open);
     
    $read strtolower($read);
    echo 
    "<textarea name='size=41' cols='45' rows='15'>$read</textarea>"

  2. #2
    SitePoint Addict SRTech's Avatar
    Join Date
    Mar 2005
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe try file_get_contents('URL') rather than fopen. You may also want to look into the Yahoo API
    http://developer.yahoo.net/

    Be aware that it is sometimes against the Terms of Use, unless you use their API. to fetch results like this.


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
  •