1 Jan 2011 18:13
Problem with URL parameters and action=uplaod
Jan Luca <jan <at> jans-seite.de>
2011-01-01 17:13:06 GMT
2011-01-01 17:13:06 GMT
Hi,
I have a problem with the API and following HTTP-request (PHP-Code):
$message =
"--".$boundary."
Content-Type: application/x-www-form-urlencoded
ignorewarnings=1&token=".urlencode($token)."&filename=".urlencode($new_file)
."&file=".urlencode("file")."&comment=".urlencode($desc)."
--".$boundary."
Content-Type: application/octet-stream
Content-Disposition: form-data; name=\"file\"; filename=\"".$new_file."\"
".$file."
--".$boundary."--";
$query = "POST ".$this->server_dir."/api.php?format=php&action=upload
HTTP/1.1
Host: ".$this->server."
Cookie: ".$this->cookies."
User-Agent: CommonsHelper2/1.0 Beta
(http://toolserver.org/~commonshelper2/index.php jan <at> toolserver.org)
Content-Type: multipart/form-data; boundary=".$boundary."
Content-Length: ".strlen($message)."
".$message."
\r\n\r\n";
(Continue reading)
Cheers,
Marc
RSS Feed