[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ProgSoc] wget in php
On Mon, 10 Oct 2005, Christian Kent wrote:
Hi folks, I have this in a php file ...
$string = `wget -Coff -q -O /home/whophd/public_html/blah http://foo`;
The magic question of the day is, "Why?"
$url = 'http://foo';
if ($fp = fopen($url, "r")) {
while (!feof($fp)) {
$string .= fread($fp, 8192);
}
fclose($string);
}
// Now, I guess you want to write it to a file?
if ($fp = fopen('~whophd/public_html/blah', 'w')) {
fwrite($fp, $string);
fclose($fp);
}
What you're trying to do is a nasty, nasty hack. And to all the people
saying "CHMOD 777 OMG LOL!", a pox on all your houses.
--
Nathan ~CSO
-
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to progsoc-request@xxxxxxxxxxxxxxxxxxx
If you are having trouble, ask owner-progsoc@xxxxxxxxxxxxxxxxxx for help.