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
	
oder
	
Das Script sieht wie folgt aus:
	
je nachdem ob ich 
  
	
  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
PHP-Code:
	
	
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
PHP-Code:
	
	
500 Internal Server Error
An internal server error occurred. Please try again later. 
Das Script sieht wie folgt aus:
PHP-Code:
	
	
$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"; 
PHP-Code:
	
	
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1); 
 
          
 Moderator
 Moderator 
							
						
Kommentar