Jump to content
php.lv forumi

curl/proxy


EdgarsK

Recommended Posts

Sveiki,

 

jautājum seskojošs

 

		curl_setopt($ch, CURLOPT_URL,$url);
	curl_setopt($ch, CURLOPT_REFERER,$url);
	curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
	curl_setopt($ch, CURLOPT_PROXY, $proxyServer);
	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($ch, CURLOPT_POST, 1);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
 curl_setopt($ch, CURLOPT_HEADERFUNCTION, 'read_header');
 curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8');

 

padodot šo curl initializaciju, man ir tada sajuta ka posts aiziet tikai proxijam bet talak no proxija uz doto adresi neaiziet, ta varetu but ? un ja ta irk o darit ?

lai aizietu uz URL nevis PROXY

Link to comment
Share on other sites

lol, tb tā arī saņem php sourci responsā??? :D

 

ja jau vsp kkādu atbildi saņem, tad jau proxy kaut cik strādā. drīzāk pārbaudi no kkāda localhost uz savu serveri (bez proxy), vai vsp post lauki normāli aiziet ;) varbūt kkas vnk nenosūtījās...

Edited by 2easy
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...