Jump to content
Sign in to follow this  
metis

TCPSend,TCPRead use proxy

Recommended Posts

metis

Hi. I need use proxy in me code.

$sName_To_IP = TCPNameToIP($sHost)
$iSocket = TCPConnect($sName_To_IP, 80)
If $iSocket = -1 Then
TCPCloseSocket($iSocket)
else
$sCommand = $naglowek_http
$sCommand &= "" & @CRLF
$sCommand &= $Body
Local $BytesSent = TCPSend($iSocket, $sCommand)
If $BytesSent = 0 Then Exit
Local $sRecv = "", $sCurrentRecv
While 1
$sCurrentRecv = TCPRecv($iSocket, 1024)
If @error <> 0 Then ExitLoop
If $sCurrentRecv <> "" Then $sRecv &= $sCurrentRecv
WEnd
TCPCloseSocket($iSocket)
TCPShutdown()
endif

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×