Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Proxy, curl
Helid
post
Post #1





Grupa: Zarejestrowani
Postów: 280
Pomógł: 20
Dołączył: 12.12.2007
Skąd: 127.0.0.1

Ostrzeżenie: (0%)
-----


Witam
Mam o to taki problem z curl + proxy że skrypt po prostu nie działa:
  1. $googleurl = 'http://toolbarqueries.google.com/search?features=Rank&sourceid=navclient-ff&client=navclient-auto-ff&googleip=O;66.249.81.104;104&ch=' . genhash($url) . '&q=info:' . urlencode($url);
  2. if(function_exists('curl_init')) {
  3. $proxy = file('../proxy.txt');
  4. $proxy = array_rand($proxy);
  5. $proxy = explode(':', $proxy);
  6. $ch = curl_init();
  7. curl_setopt($ch, CURLOPT_HEADER, 0);
  8. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  9. curl_setopt($ch, CURLOPT_URL, $googleurl);
  10. //curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
  11. curl_setopt($ch, CURLOPT_PROXY, $proxy[0].':'.$proxy[1]);
  12. //curl_setopt($ch, CURLOPT_PROXYPORT, $proxy[1]);
  13. $out = curl_exec($ch);
  14. curl_close($ch);
  15. } else {
  16. $out = file_get_contents($googleurl);
  17. }

Kominbuje już na x sposób i zero efektu sciana.gif
Przy ustawieniu proxytunnel na 1 skrypt zwraca blank page (nic).


--------------------
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 05:36