SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright - here it is:

    Code:
    Warning: fopen("http://domain.com/url/","r") - Success in /home/pathtoscript/script.php3 on line 31
    Code:
    $web_content = fopen("$url", "r");
    
    
    // open the cache file and grab what we need
    
    $x = 0; 
    while(!feof($web_content)) {
    
    	$line = fgets($web_content, 1500) ;
    Okay code snippet one is the error I get. It says Warning blah blah but then it says success? - however it then scrolls a bunch of warnings that I'm using an invalid filehandle (it scrolls em because of that while loop)

    So whats the deal?
    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Try it without the quotes around $url.


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
  •