JamesCarter
27-06-2008, 03:30
Hallo,
Ich habe gesehen das mann CURL auch über ein Proxy benutzen kann
allerdings kriege ich das nicht so ganz hin ich krieg entweder eine weiße Seite zurück, bzw den Fehler
HTTP/1.1 302 Found Date: Fri, 27 Jun 2008 01:21:14 GMT Server: Apache X-powered-by: PHP/5.2.6
Location:
http://www.000webhost.com/admin-review
Content-length: 0
Connection: close Content-type: text/html
oder
500 Internal Server Error
An internal server error occurred. Please try again later.
Das Script sieht wie folgt aus:
$url='http://jamescarter.web44.net/test.php';
$proxy='198.151.38.68:80';
$vars='var1=1&var2=text';
$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookiefile");
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookiefile");
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $vars);
$result = curl_exec($ch); // run the whole process
echo "$result";
je nachdem ob ich
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1); auf 1 oder 0 stelle
Ich habe gesehen das mann CURL auch über ein Proxy benutzen kann
allerdings kriege ich das nicht so ganz hin ich krieg entweder eine weiße Seite zurück, bzw den Fehler
HTTP/1.1 302 Found Date: Fri, 27 Jun 2008 01:21:14 GMT Server: Apache X-powered-by: PHP/5.2.6
Location:
http://www.000webhost.com/admin-review
Content-length: 0
Connection: close Content-type: text/html
oder
500 Internal Server Error
An internal server error occurred. Please try again later.
Das Script sieht wie folgt aus:
$url='http://jamescarter.web44.net/test.php';
$proxy='198.151.38.68:80';
$vars='var1=1&var2=text';
$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookiefile");
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookiefile");
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $vars);
$result = curl_exec($ch); // run the whole process
echo "$result";
je nachdem ob ich
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1); auf 1 oder 0 stelle
