| 
 Posted by Andy Hassall on 04/01/07 15:40 
On 1 Apr 2007 02:07:27 -0700, cmk128@hotmail.com wrote: 
 
>$lines = file('http://google.com'); 
>echo $lines[0]; 
> 
>it doesn't work,  
 
 In what way does it not work? It works here: 
 
andyh@server ~/public_html $ php -q test.php  
<html><head><meta http-equiv="content-type" content="text/html; 
charset=ISO-8859-1"><title>Google</title><style><!-- 
 
 Saying "doesn't work" on its own is completely unhelpful; what did you expect? 
What actually happened? 
 
>i want to echo the first line, how to? 
 
 You just did. Perhaps you want to do something else? Try being more precise; 
first line of what? 
 
-- 
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk 
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
 
  
Navigation:
[Reply to this message] 
 |