php wget: Return an empty file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings PHP(eople),

I have a wget process that runs to download a file from a web site,
however, if no file exists at the location I`m pulsing, how do I get it
to abort ?

Here is the code :

<?php
$getfile = 'wget -dv -o log.txt http://www.somesite.co.za/somefile.php';
$get = shell_exec($getfile);
?>

I looked at filesize(), but if no file is brought back then there is
nothing for the function to check.

If someone could point me to the right PHP function, or a link
somewhere...

Regards

--
Chris Blake 
Cell: 082 775 1492
Work: +27 11 782 0840
Fax : +27 11 782 0841
Mail: chris@xxxxxxxxxxxx

I have a very good DENTAL PLAN. Thank you.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux