Re: copy problem with HTTP wrapper

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

 



Laurent,

Laurent Vanstaen wrote:
>> If so, what makes you think it's writable in the first place?
> 
> 'Cause I work for this ISP ....

So you don't have specs then I guess, since you're asking in a public
forum!  Have you considered using a HTTP PUT request (using cURL)?

php.net/curl

$curl = curl_init();
$file = "replacementfile.txt";

curl_setopt($curl, CURLOPT_URL, 'http://192.168.1.1/cgi-bin/newCrontab');
curl_setopt($curl, CURLOPT_PUT, true);
curl_setopt($curl, CURLOPT_INFILESIZE, filesize($file));
curl_setopt($curl, CURLOPT_INFILE, fopen($file, 'r'));

curl_exec($curl);

Note: you might need to set the CURLOPT_USERPWD option too.

This is my best guess at a solution, but obviously I've not tested it.

David
-- 
David Grant
http://www.grant.org.uk/

http://pear.php.net/package/File_Ogg    0.2.1
http://pear.php.net/package/File_XSPF   0.1.0

-- 
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