Guest JRowe_1 Posted November 29, 2006 Share Posted November 29, 2006 Of course, me playing any more with it would require me knowing how to forward a port internally through the network, which is beyond me at this point in time. anyway, I'll have a local version of this running soon, I've already looked into displaying some of my own pages, it seems to work just fine Link to comment Share on other sites More sharing options...
thenewkid Posted November 29, 2006 Share Posted November 29, 2006 how do i set this up? some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with Link to comment Share on other sites More sharing options...
the DtTvB Posted November 29, 2006 Author Share Posted November 29, 2006 piccaso: I would like to give you a huge thanks for helping, but posting here is too annoying, so here you go! thanks.htmlI got a lot of knowledge from you!thenewkid: I updated the first post with some manuals. [right]Please visit: My biggest project, the DtTvB's AutoIt Web ServerOlder Stuff: A Smoother MouseMove :: AutoIt Syntax Highlighter[/right] Link to comment Share on other sites More sharing options...
spyrorocks Posted November 29, 2006 Share Posted November 29, 2006 for the pre-rpocessor, im making some UDFs just like the autoit gui functions exept these ones will allow you to easly make stuff in the web browser, that will be outputted by the server to the end user. [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Link to comment Share on other sites More sharing options...
piccaso Posted November 29, 2006 Share Posted November 29, 2006 I don't mean to be stupid...how should i know?no really, i didnt understand your request so i answered just something basic if you still need info on something specific just ask...I would like to give you a huge thanks for helping, but posting here is too annoying, so here you go! thanks.htmlI got a lot of knowledge from you! your welcome Actually i have to thank you.I allways wanted to write a http server in autoit but never was motivated enough to start it.so i hope you dont mind when i continue contributing.and here is a list of things i would like to do in the near future: 'Connection: Close' Should be in the Reply if i understand the rfc's right Maybe Resume support. the Range Header looks tricky but maybe.. put the pre into the Preprocessor and support '<?au3 ?>' tags based on extension like: au3,a3x -> Process as Usual au3s -> syntax highlighting ahp,aha,... Preprocess Max Execution time for scripts script output in a seperate threadare you sure you don't want to get familiar with subversion?it ain't that hard CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
McGod Posted November 30, 2006 Share Posted November 30, 2006 Ive been coding POST into the web server. I figured out that it errors bad when a POST is sent. [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u] Link to comment Share on other sites More sharing options...
spyrorocks Posted November 30, 2006 Share Posted November 30, 2006 I could code in max execution time really quickly if anyone wants me to... [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Link to comment Share on other sites More sharing options...
piccaso Posted November 30, 2006 Share Posted November 30, 2006 Ive been coding POST into the web server. I figured out that it errors bad when a POST is sent.POST is not implemented yet.or is it that what you are trying to do? implementing post?I could code in max execution time really quickly if anyone wants me to...i know you can do that how about supporting <? ?> tags?do you want to do that too?i am going to setup a svn repository anyway, and if its just for me...if someone wants to use it too pn me your email OR preferred login/pass CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
spyrorocks Posted November 30, 2006 Share Posted November 30, 2006 OK i will try to do the <?au3 tags now. here is the pre-processor timeout support version: WebServer_1.2_Piccaso_3___spyrorocks_script_timeout.zip [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Link to comment Share on other sites More sharing options...
piccaso Posted November 30, 2006 Share Posted November 30, 2006 added that into my new svn repository CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
spyrorocks Posted November 30, 2006 Share Posted November 30, 2006 OK. The preprocessor for <? tags is going good. [center] My Projects: Online AutoIt Compiler - AutoForum - AutoGuestbook - AutoIt Web-based Auto Installer - Pure AutoIt Zipping Functions - ConfuseGen - MindReader - P2PChat[/center] Link to comment Share on other sites More sharing options...
the DtTvB Posted November 30, 2006 Author Share Posted November 30, 2006 As Chip said, the script will error when sending the POST request, which is too hard for me to handle. About <? tags, it's a good idea also..... Please use <?au3, not just <?, because it should confuse with <?xml or <?php And having SVN is a really good idea! Connection: Close, wow, I forgot about this! [right]Please visit: My biggest project, the DtTvB's AutoIt Web ServerOlder Stuff: A Smoother MouseMove :: AutoIt Syntax Highlighter[/right] Link to comment Share on other sites More sharing options...
piccaso Posted November 30, 2006 Share Posted November 30, 2006 POST is just for cgi right?but what should happen when someone uses POST on a static page?act like get or throw an error?... these rfc's are hard to read @spyrorocksdid you read thathope it isn't to late... CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
theguy0000 Posted November 30, 2006 Share Posted November 30, 2006 POST is just for cgi right?but what should happen when someone uses POST on a static page?act like get or throw an error?... these rfc's are hard to read @spyrorocksdid you read thathope it isn't to late...post should be ignored if used on a static page, I think.By the way, if you need help implementing cgi, just look at my web-based autoit, which is cgi complient. Unless of course you already found the info for it.Just do everything the reverse of how my UDFs do it.The entire query, everything after the url, including the question mark, in raw form, should be sent toEnvSet ("QUERY_STRING", $query)As for POST, you need to write the raw POST data in the same form as get (maybe without the question mark, not sure) to ConsoleWrite. And EnvSet ("CONTENT_LENGTH") to the length of the POST data.here is a full list of env vars in cgi. Have fun 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...
piccaso Posted December 1, 2006 Share Posted December 1, 2006 damn that's a bunch off variables to do... so i wrote a header parser but it looks awful. any idea how this could be done with regex? Dim $sHeaders, $aHeaders $sHeaders &= "GET /shadowright.gif HTTP/1.1" & @CRLF $sHeaders &= "Host: 127.0.0.1:27643" & @CRLF $sHeaders &= "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1) Gecko/20061010 Firefox/2.0" & @CRLF $sHeaders &= "Accept: image/png,*/*;q=0.5" & @CRLF $sHeaders &= "Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3" & @CRLF $sHeaders &= "Accept-Encoding: gzip,deflate" & @CRLF $sHeaders &= "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" & @CRLF $sHeaders &= "Keep-Alive: 300" & @CRLF $sHeaders &= "Connection: keep-alive" & @CRLF $sHeaders &= "Referer: http://127.0.0.1:27643/" & @CRLF & @CRLF $aHeaders = StringSplit($sHeaders, @CRLF, 1) ConsoleWrite(_GetHeader($aHeaders, "user-agent:")) ; --- Func _GetHeader($aHeaders, $sHeader) Local $iSize = StringLen($sHeader) $sHeader = StringUpper($sHeader) For $i = 0 To UBound($aHeaders) - 1 If StringUpper(StringLeft($aHeaders[$i], $iSize)) = $sHeader Then _ Return StringStripWS(StringMid($aHeaders[$i], StringInStr($aHeaders[$i], $sHeader) + $iSize), 1 + 2) Next Return SetError(1, 0, "") EndFunc CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
McGod Posted December 1, 2006 Share Posted December 1, 2006 I got my POST working, although the way i coded it is disgusting. When I clean it up, I'll post it. (Get it POST it) lol [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u] Link to comment Share on other sites More sharing options...
the DtTvB Posted December 1, 2006 Author Share Posted December 1, 2006 For header processing, I would split the entrie header into lines. Then, go through each line. Call a function to check string. That function would check if the string starts with [argument]: Then trim the value. And if it does match, it should set the global variables. [right]Please visit: My biggest project, the DtTvB's AutoIt Web ServerOlder Stuff: A Smoother MouseMove :: AutoIt Syntax Highlighter[/right] Link to comment Share on other sites More sharing options...
Dhilip89 Posted December 1, 2006 Share Posted December 1, 2006 (edited) Hello, I made a really simple GUI for this web server. you may download it from there: WebServer.zip Edited December 1, 2006 by Dhilip [u]My Projects[/u]:General:WinShell (Version 1.6)YouTube Video Downloader Core (Version 2.0)Periodic Table Of Chemical Elements (Version 1.0)Web-Based:Directory Listing Script Written In AutoIt3 (Version 1.9 RC1)UDFs:UnicodeURL UDFHTML Entity UDF[u]My Website:[/u]http://dhilip89.hopto.org/[u]Closed Sources:[/u]YouTube Video Downloader (Version 1.3)[quote]If 1 + 1 = 10, then 1 + 1 ≠ 2[/quote] Link to comment Share on other sites More sharing options...
Apzo Posted December 1, 2006 Share Posted December 1, 2006 For header processing, I would split the entrie header into lines. Then, go through each line. Call a function to check string. That function would check if the string starts with [argument]: Then trim the value. And if it does match, it should set the global variables. I've already done this but my code needs serious improvement. It gives post, get and cookie support, however. It's not fully compatible with web.au3. For example GET and POST vars become GQUERY_STRING and PQUERY_STRING Note that _EnvSet() is a function, it can be integrated seamlessly. Just put it after you got $recv : $recv = _SockRecv($sock) _EnvSet()oÝ÷ Ø:'ßÛ_¢¸¶Ú+zDzz{ïj»"~z-Ê°Yaj÷¡×¶¦zÖ¬º«Zj[²È¨ Úvæy×(ºW[yû§j[a¢è!")zØb³¥¥¤ s¡«¢+ÙÕ¹}¹ÙMÐ ¤(%¹ÙMÐ ÅÕ½Ðí =9Q9Pµ19Q ÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(%¹ÙMÐ ÅÕ½ÐíAEUIe}MQI%9ÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(%¹ÙMÐ ÅÕ½ÐíEUIe}MQI%9ÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(%¹ÙMÐ ÅÕ½Ðí!QQA} ==-%ÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(%¹ÙMÐ ÅÕ½ÐíI XÅÕ½Ðì°ÀÌØíÉؤ(%¹ÙMÐ ÅÕ½ÐíI5=Q}HÅÕ½Ðì°M½ÑQ½%@ ÀÌØíͽ¬¤¤(%}¥¹¹MÐ ÅÕ½Ðí AQ}19UÅÕ½Ðì°ÅÕ½ÐíÁе1¹ÕèÅÕ½Ðì¤(%}¥¹¹MÐ ÅÕ½Ðí!=MPÅÕ½Ðì°ÅÕ½Ðí!½ÍÐèÅÕ½Ðì¤(%}¥¹¹MÐ ÅÕ½ÐíUMI}9PÅÕ½Ðì°ÅÕ½ÐíUÍȵ¹ÐèÅÕ½Ðì¤(%}¥¹¹MÐ ÅÕ½ÐíMIYI}95ÅÕ½Ðì°ÅÕ½Ðí!½ÍÐèÅÕ½Ðì¤(%}¥¹¹MÐ ÅÕ½Ðí =9Q9Pµ19Q ÅÕ½Ðì°ÅÕ½Ðí ½¹Ñ¹Ðµ1¹Ñ èÅÕ½Ðì¤(%}¥¹¹MÐ ÅÕ½Ðí!QQA} ==-%ÅÕ½Ðì°ÅÕ½Ðí ½½¥èÅÕ½Ðì¤((%1½°ÀÌØí!PôMÑÉ¥¹IáÀ ÀÌØíÉØ°ÅÕ½Ðì¡!QQ@¼Ä¸¸¤ÅÕ½Ðì°Ä¤(%¹ÙMÐ ÅÕ½ÐíMIYI}AI=Q= =0ÅÕ½Ðì°ÀÌØí!QlÁt¤((%1½°ÀÌØí5Q ôMÑÉ¥¹IáÀ ÀÌØíÉØ°ÅÕ½Ðì¡A=MQñP¤ÅÕ½Ðì°Ä¤(%1½°ÀÌØíM8(%%ÀÌØí5Q!lÁtôÅÕ½ÐíPÅÕ½ÐìQ¡¸($$ÀÌØíM8ôMÑÉ¥¹IáÀ ÀÌØíÉØ°ÅÕ½Ðì¡A=MQñP¤ ¸¨¤ ÀäÈìü¸¨¤¡!QQ@¸¨¤ÅÕ½Ðì°Ä¤(%¹%(%%ÀÌØí5Q!lÁtôÅÕ½ÐíA=MPÅÕ½ÐìQ¡¸($$ÀÌØíM8ôMÑÉ¥¹IáÀ ÀÌØíÉØ°ÅÕ½Ðì¡A=MQñP¤ ¸¨¤¡!QQ@¸¨¤ÅÕ½Ðì°Ä¤(%¹%(%%%ÍÉÉä ÀÌØíM8¤Q¡¸($%1½°ÀÌØíM8ôU ½Õ¹ ÀÌØíM8¤($%¹ÙMÐ ÅÕ½ÐíM I%AQ}95ÅÕ½Ðì°ÀÌØíM9lÅt¤($%%ÀÌØí5Q!lÁtôÅÕ½ÐíPÅÕ½ÐìQ¡¸($$%%ÀÌØíM8ÐìôÌQ¡¸($$$%1½°ÀÌØíEHôMÑÉ¥¹QÉ¥µ1Ð ÀÌØíM9lÉt°Ä¤($$$%¹ÙMÐ ÅÕ½ÐíEUIe}MQI%9ÅÕ½Ðì°ÀÌØíEH¤($$%¹%($%¹%($%%ÀÌØí5Q!lÁtôÅÕ½ÐíA=MPÅÕ½ÐìQ¡¸($$%1½°ÀÌØíEHôMÑÉ¥¹I¥¡Ð ÀÌØíÉØ°¹ÙÐ ÅÕ½Ðí =9Q9Pµ19Q ÅÕ½Ð줬Ȥ($$$ÀÌØíEHôMÑÉ¥¹QÉ¥µI¥¡Ð ÀÌØíEH°È¤($$%¹ÙMÐ ÅÕ½ÐíAEUIe}MQI%9ÅÕ½Ðì°ÀÌØíEH¤($%¹%(%¹%)¹Õ¹()Õ¹}¥¹¹MÐ ÀÌØí¹Ù9µ°ÀÌØíݡФ(%1½°ÀÌØí0ôMÑÉ¥¹IáÀ ÀÌØíÉØ°ÀÌØíݡеÀìÅÕ½Ðì ¸¨¤ÀÌØìÅÕ½Ðì°Ä¤(%%9½ÐÉɽȹ%ÍÉÉä ÀÌØí0¤Q¡¸($$ÀÌØí1lÁtôMÑÉ¥¹1Ð ÀÌØí1lÁt°MÑÉ¥¹%¹MÑÈ ÀÌØí1lÁt° I1¤´Ä¤($%¹ÙMÐ ÀÌØí¹Ù9µ°ÀÌØí1lÁt¤(%¹%)¹Õ¹( All the pop3 functions.Rsync your files on your USB key (or anywhere else) Link to comment Share on other sites More sharing options...
webmedic Posted December 1, 2006 Share Posted December 1, 2006 small fix. This is for the last version that spyrorocks? uploaded with timeout support. There is an issue were after it processes the au3 script it does not close the socket and so it appears as though the server hangs. The fix is to remove the continueloop after you output the data. Here is a fixed version that I have also added debuging to(right now only for the preprocessing) and it also includes reduce memory function. Reduce mem cut's it's memory usage in about half. Also there seems to be a slow leak someplace as the memory usage goes up and up the more pages that are viewed and does not ever come back down without the reducemem function. 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