Sign in to follow this  
Followers 0
schnibble

Internet GET POST with TCPSend

6 posts in this topic

how can i receiv with TCPSend and TCPRecv a large Webpage?

My current function is:

CODE
TCPStartup ( )

$ip = TCPNameToIP(xyz)

$socket = TCPConnect( $ip, 80 )

$data = "GET /index.html HTTP/1.1"

$receivtmp = ""

$receiv = ""

$send = TCPSend ( $socket, $data )

While Not $receivtmp

$receivtmp = TCPRecv ( $socket, 10000 )

Sleep(100)

WEnd

$receiv = $receivtmp

While $receivtmp

$receivtmp = TCPRecv ( $socket, 10000 )

$receiv = $receiv & $receivtmp

Sleep(100)

WEnd

TCPShutdown ()

but sometimes it dont work..

can i use a dll or a udf?

Share this post


Link to post
Share on other sites



Try _INetGetSource.

Share this post


Link to post
Share on other sites

Try _INetGetSource.

i think that will be a load easyer :) but i have done it With tcp :D with a litle searching on Wikipedia and using Ethereal :-)

Share this post


Link to post
Share on other sites

but the website is not only a simple side

as example:

POST /forum/index.php?act=Search&CODE=01 HTTP/1.1

Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*

Referer: http://www.autoitscript.com/forum/index.php

Accept-Language: de-ch

Content-Type: application/x-www-form-urlencoded

Accept-Encoding: gzip, deflate

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)

Host: www.autoitscript.com

Content-Length: 36

Connection: Keep-Alive

Cache-Control: no-cache

forums=all&keywords=autoit&x=14&y=20

and the result site is large

Share this post


Link to post
Share on other sites

POST /forum/index.php?act=Search&CODE=01 HTTP/1.0

Accept: */*

Referer: http://www.autoitscript.com/forum/index.php

Host: www.autoitscript.com

Connection: Keep-Alive

forums=all&keywords=autoit&x=14&y=20

thats a lot shorter and works well to :-)

Share this post


Link to post
Share on other sites

i know its only a example...

no solution for get / post websites with tcpsend / tcpreceiv

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  
Followers 0