So I've been wondering (and testing), can I use fsockopen with proxy and UDP traffic?
Cause for example this:
$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 to send some data with fwrite read reply with fread I get nothing.
But without proxy everything works perfectly. I tried load of public proxies but I could never get reply...
Any thoughts on thisone? Also I'm starting to think "fputs($fp, "CONNECT host.name.com:512\r\n");" is not the right way for this... or is it?