autoitxp Posted April 20, 2008 Posted April 20, 2008 (edited) Hi here is problem i dont know why its not receiving any data when i use $sBuff = TCPRecv($ConnectedSocket, 1024 * 5 , 1) this retrieve binay data but when again its 1 to 0 it receive nothing then white spaces and link is fine there is no problem with browse can open this type of link but i cant get data from these link while using of TCPRecv Plz help !!! expandcollapse popup#include <GUIConstants.au3> #include <IE.au3> TCPStartUp() ;Dim $ConnectedSocket = -1 $ConnectedSocket = TCPConnect("xxx.x.x.x",80) If @error Then MsgBox(4112,"Error","TCPConnect failed with WSA error: " & @error) Else $sReq = "GET http://pagead2.googlesyndication.com/pagead/iclk?sa=l&ai=BFe9xUoILSLSrH5WG7APklYy3C7ywuT7u1KenBcCNtwGQkhQQARgBIKKPywY4AFDgidz8AmCdAbIBEHd3dy52ZW5udGVj aC5uZXS6AQoxODB4MTUwX2FzyAEB2gEYaHR0cDovL3d3dy52ZW5udGVjaC5uZXQvqQJu0slJ0FeVPsgC0OK5AqgDAbADkpWgBsgD B-gDGegDVPUDAgAAAA&num=1&adurl=http://adsense-secret.slalu.com/&client=ca-pub-4559862361413832/ HTTP/1.1 " & @CRLF & @CRLF ConsoleWrite("Sent Request:" & @CRLF & $sReq & @CRLF) TCPSend($ConnectedSocket,$sReq) $sRepy = "" While 1 $sBuff = TCPRecv($ConnectedSocket, 1024 * 5 ) If @error Then ExitLoop If StringLen($sBuff) > 0 Then $sRepy &= $sBuff EndIf Sleep(100) WEnd $sRepy &= @crlf $iHeadEnd = StringInStr($sRepy,@CRLF & @CRLF) +2 $sRepyHead = StringMid($sRepy,1,$iHeadEnd) $sRepyBody = StringMid($sRepy,$iHeadEnd) ConsoleWrite($sRepyBody) $oIE = _IECreate ("about:blank") $html = _IEBodyWriteHTML ($oIE,$sRepyBody) sleep(20000) _IEQuit($oIE ) TCPShutdown ( ) EndIf Edited April 20, 2008 by autoitxp
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now