59FIFTY Posted December 22, 2006 Share Posted December 22, 2006 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? TCPStartup() 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) TCPCloseSocket($fsocket) PS: This forum has a beautyfull them Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted December 22, 2006 Share Posted December 22, 2006 Theres a HTTP Post/Get UDF around here somewher xD Link to comment Share on other sites More sharing options...
_Kurt Posted December 22, 2006 Share Posted December 22, 2006 Theres a HTTP Post/Get UDF around here somewher xDYes, 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 udfsKurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
59FIFTY Posted December 22, 2006 Author Share Posted December 22, 2006 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 Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted December 22, 2006 Share Posted December 22, 2006 lol yeah ill look somemore just can't seem to remember who it was by xD Link to comment Share on other sites More sharing options...
theguy0000 Posted December 22, 2006 Share Posted December 22, 2006 (edited) an http request chould look like this:GET /dir/file.ext HTTP/1.1 @CRLFHost: www.something.com@CRLFFrom: email@address.com @CRLFUser-Agent: ProgramName/1.0 @CRLFConnection: Close@CRLFchange 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(STATUS CODE) (STATUS DESCRIPTION) HTTP/1.x @CRLFheader: something @CRLFanotherHeader: more something @CRLF(there could be any amount of headers here) @CRLF@CRLF(BODY OF PAGE)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(successful)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 December 22, 2006 by theguy0000 The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
59FIFTY Posted December 22, 2006 Author Share Posted December 22, 2006 @theguy0000 I know how a HTTP POST GET HEAD works, but thanks anyway. I have problem with Autoit not with w3c HTTP Link to comment Share on other sites More sharing options...
DaleHohm Posted December 22, 2006 Share Posted December 22, 2006 @theguy0000I know how a HTTP POST GET HEAD works, but thanks anyway. I have problem with Autoit not with w3c HTTPHere: HTTP UDFDale 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 Link to comment Share on other sites More sharing options...
59FIFTY Posted December 22, 2006 Author Share Posted December 22, 2006 That's what I was looking for, thanks for that DaleHohm (btw. my name is Dale ) Link to comment Share on other sites More sharing options...
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