I am doing HTTP POST using cURL
$url = "http://localhost:8080/~demo/cgi-bin/execute/100";
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST,count($data));
curl_setopt($ch,CURLOPT_POSTFIELDS,$data);
$result = curl_exec($ch);
echo("$result");
curl_close($ch);
The message starts, but the response is displayed with an error:
The requested URL / ~ demo / 100 was not found on this server .
The above URL obviously does not exist, and not because (somehow) cURL changed the URL.
It should be /~demo/cgi-bin/execute/100
. This URL works in a browser.
Please tell me why this is so? And how can I stop it, what do I want?
source
share