Jump to content
Sign in to follow this  


Recommended Posts

Im new to Autoit and its functions. I was trying to connect to a regular HTTP WebServer over TCPConnect, but I just cant figure out how to do it. I know there's a UDF for INet but the function _INetGetSource can only gather informations from a Server, and not send them (viceversa)

Is there an easy way so set up a socket connection?

Dim $url = "www.msn.com"
Dim $port = 80
Dim $serverIp = TCPNameToIP($url)

$fsocket = TCPConnect($serverIp,$port)
TCPSend($fsocket, $HTTP_POST_HEADER)
$recv = TCPRecv($fsocket, 4096)

PS: This forum has a beautyfull them :P

Share this post

Link to post
Share on other sites

Theres a HTTP Post/Get UDF around here somewher xD

Yes, I am sure there are many! just search it up, you`ll find plenty of stuff. Sorry I cannot help, I really suck with TCP udfs


Awaiting Diablo III..

Share this post

Link to post
Share on other sites

As stupid as it might sound, but I searched for over half an hour and didnt find anything, only the _INetGetSource and some SMTP POP3 stuff

Share this post

Link to post
Share on other sites

an http request chould look like this:

GET /dir/file.ext HTTP/1.1 @CRLF

Host: www.something.com@CRLF

From: email@address.com @CRLF

User-Agent: ProgramName/1.0 @CRLF

Connection: Close


change the stuff in italics to meet your needs. and be sure to include ALL the @CRLF's, or it won't work right. And be sure to keep the Host line and the Connection line, but the From and User-Agent lines can be removed if you want.

and here is what you should recieve in response:

100 Continue @CRLF


header: something @CRLF

anotherHeader: more something @CRLF

(there could be any amount of headers here) @CRLF



oh, and when you recieve, there will be a status code. Here is a list of the codes (numbers) and the descriptions (words)

200 OK


404 Not Found

(the requested file doesn't exist)

301 Moved Permanently

(the requested page has moved permanently to the url in the Location header)

302 Moved Temporarily

(the requested page has moved temporarily to the url in the Location header)

303 See Other

(The resource has moved to another URL (given by the Location: response header), and should be automatically retrieved by the client. This is often used by a CGI script to redirect the browser to an existing file.)

500 Server Error

(An unexpected server error. The most common cause is a server-side script that has bad syntax, fails, or otherwise can't run correctly.)

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post

Link to post
Share on other sites


I know how a HTTP POST GET HEAD works, but thanks anyway. I have problem with Autoit not with w3c HTTP



Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...