Beispiel #1
0
	  curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
	  curl_setopt($curl, CURLOPT_FOLLOWLOCATION, FALSE);
	  curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
	  curl_setopt($curl, CURLOPT_AUTOREFERER, TRUE);
	  $result = curl_exec($curl);		

	} else {
	  // parse html, and reset links so they work with the proxy
	  $html = file_get_html($newURL);

	  $this->resetLink($html, "a", "href", true);
	  $this->resetLink($html, "img", "src", false);
	  $this->resetLink($html, "script", "src", false);
	  $this->resetLink($html, "link", "href", false);
	  $this->resetLink($html, "iframe", "src", false);
	  $this->resetLink($html, "object", "data", false);

	  // dump to browser
	  echo $html->root->innertext();
	}
  }
}

$proxy = new Proxy;

$proxy->doProxy();
?>