Using fsockopen with UDP and proxy?
So, I was wondering (and testing) if I can use fsockopen with proxy and UDP traffic?
Give an example, for example:
$fp = fsockopen('udp://host.name.com', 512, $errno, $errstr);
if(!$fp){ die($errno . ' - ' . $errstr); }
works ... but as soon as I add proxy
$proxy = "123.58.183.141 "; // proxy
$port = 1080; // proxy port
$fp = fsockopen("udp://".$proxy, $port, $errno, $errstr);
if(!$fp){ die($errno . ' - ' . $errstr); }
// after connecting to proxy... connect to target...
fputs($fp, "CONNECT host.name.com:512\r\n");
and try sending some data with fwrite read response using fread. I am not getting anything.
But without a proxy, everything works fine. I tried downloading public proxies but I was never able to get an answer ...
Any thoughts on this? Also I am starting to think "fputs ($ fp," CONNECT host.name.com:512\r\n "); is not good for this ... or is it?
+3
source to share
No one has answered this question yet
Check out similar questions: