Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2009-01-11 Thread Daniel Brown
On Sun, Jan 11, 2009 at 13:42, Nathan Rixham wrote: > > pedantic: really you'd want to check the http status header returned and > take the appropriate action depending on what header was returned. > > I'm sure there's a way to get the headers from a file_get_contents using one > of the stream_get

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2009-01-11 Thread Nathan Rixham
Daniel Brown wrote: On Sun, Jan 11, 2009 at 13:07, John Allsopp wrote: Thanks, that worked a treat except I was getting warnings on 404. I looked around for solutions to that and it appears curl might handle that better, so I'm currently working on that. Many thanks tho .. let me know if you kn

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2009-01-11 Thread Daniel Brown
On Sun, Jan 11, 2009 at 13:10, John Allsopp wrote: > > So far I'm getting a lot of *Warning*: curl_setopt(): supplied argument is > not a valid cURL handle resource in */home/myAcc/public_html/test.php* on > line *58 > * > I searched phpinfo for 'curl' and it came up nothing, so I'm just checking

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2009-01-11 Thread Daniel Brown
On Sun, Jan 11, 2009 at 13:07, John Allsopp wrote: > > Thanks, that worked a treat except I was getting warnings on 404. I looked > around for solutions to that and it appears curl might handle that better, > so I'm currently working on that. Many thanks tho .. let me know if you know > how to sto

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2009-01-11 Thread John Allsopp
Nathan Nobbe wrote: On Sun, Dec 28, 2008 at 11:02 AM, John Allsopp wrote: Hi I'm sure this is simple for yous all but I'm not sure I know the answer. $myFileLast = "http://www.myDomain.com/text.txt";; if (is_readable($myFileLast)) { $fh = fopen($myFileLast, 'r')

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2009-01-11 Thread John Allsopp
Daniel Brown wrote: On Sun, Dec 28, 2008 at 13:02, John Allsopp wrote: $myFileLast = "http://www.myDomain.com/text.txt";; if (is_readable($myFileLast)) { $fh = fopen($myFileLast, 'r'); $theDataLast = fread($fh, 200); fclose($fh); echo

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2008-12-28 Thread Daniel Brown
On Sun, Dec 28, 2008 at 13:02, John Allsopp wrote: > > $myFileLast = "http://www.myDomain.com/text.txt";; > if (is_readable($myFileLast)) > { > $fh = fopen($myFileLast, 'r'); > $theDataLast = fread($fh, 200); > fclose($fh); > echo ("The dat

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2008-12-28 Thread Nathan Nobbe
On Sun, Dec 28, 2008 at 11:02 AM, John Allsopp wrote: > Hi > > I'm sure this is simple for yous all but I'm not sure I know the answer. > > $myFileLast = "http://www.myDomain.com/text.txt";; > if (is_readable($myFileLast)) > { > $fh = fopen($myFileLast, 'r'); >

[PHP] is_readable(http://.... text file) says not, but I can in browser

2008-12-28 Thread John Allsopp
Hi I'm sure this is simple for yous all but I'm not sure I know the answer. $myFileLast = "http://www.myDomain.com/text.txt";; if (is_readable($myFileLast)) { $fh = fopen($myFileLast, 'r'); $theDataLast = fread($fh, 200); fclose($fh);