Joseroy Posted April 26, 2006 Share Posted April 26, 2006 Folks who want to do TCP/IP aware scripts are interested in accessing the currently used dynamic ip address of a PC or router. To do so, most use 3rd party web sites to provide the information. If the server hosting your own web site supports PHP, you can have your own web site provide your Autoit script the same information, only better since (1) the data is clean and without html tags so no parcing is necessary and (2) your Autoit scripts are more stable since you have control of your own web site. Simply save this PHP code with a .php extension and upload it to your web site (Obviously, if the web server hosting your web site does not support PHP, this won't work so check it out first with your web hosting ISP.):I also have this PHP script on line for trial (although I probably won't have it on line for public use too long...) at:Get My Current IP AddressIf you view the source code of the page in the web browser, there is nothing there but your IP address.expandcollapse popup<?php header("Cache-Control: no-cache, must-revalidate"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Pragma: no-cache"); // The headers above insure the data is not cached. // The Old Expire date is to insure any previous downloads are outdated. // Do not put any comments above the header codes as PHP wants headers to be // the first lines in a PHP script. // These headers are mostly for web browsers and probably have little use in Autoit scripts. //******** // The code below filters out unnecessary data which might be fed into // the PHP script (accidental or intentional) -- otherwise can be a security hole. if (!empty($_POST)) { Exit; } if (!empty($_GET)) { Exit; } if (!empty($_COOKIE)) { Exit; } // This last check is reduntant to the above 3, but here just in case... if (!empty($_REQUEST)) { Exit; } // This is not part of $_REQUEST, so must be filtered separately. if (!empty($_FILES)) { Exit; } //****** // The echo below is what is returned; the global IP address -- clean of any // html tags, so no parcing is necessary upon receipt. echo $host = $_SERVER['REMOTE_ADDR']; exit; // If your web hosting ISP supports PHP, you can place this PHP script // in your web site and access it to check out the current IP global (dynamic) // address your PC is using directly or via a router (i.e., the dynamic IP // address your router is using.) // If routers are used, you can configure the local and remote routers to forward // particular port/s to the PC's local IP addresses. Once the relevant IP addresses // and ports are known (mutually advised via email?), the local and remote PC's // can be made to talk to each other via an Autoit script. ?>This is obviously simple PHP, but it works.I hope it helps...Jose Link to comment Share on other sites More sharing options...
frank10 Posted June 24, 2006 Share Posted June 24, 2006 Thank you. I found it useful, it was just what I wanted to do. Now, I'll insert it in another php to save the Ip and to check if my home connection has changed IP. Link to comment Share on other sites More sharing options...
ChrisL Posted June 26, 2006 Share Posted June 26, 2006 Cool, I can probably use this! [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Zach Posted June 29, 2006 Share Posted June 29, 2006 Thats nice - but you could skip all that and just use the only thing doing something in all that - <?=$_SERVER['REMOTE_ADDR'];?> and be done with it. Link to comment Share on other sites More sharing options...
jefhal Posted June 29, 2006 Share Posted June 29, 2006 <?=$_SERVER['REMOTE_ADDR'];?>It works. Thank you for helping me create my first PHP site!! ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
AutoItKing Posted June 30, 2006 Share Posted June 30, 2006 Looks like you're getting into the wonderful world of php too huh? Or are you a master? Nice script! http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
Bounda Posted July 9, 2006 Share Posted July 9, 2006 im srry if im being stupid but what exactly does this do, allow you to run autoit scripts on your webhosts? b/c thats what ive been wanting to do for a while CS:S Aimbot - List From INI Funcs Link to comment Share on other sites More sharing options...
WTS Posted July 9, 2006 Share Posted July 9, 2006 (edited) This is nice.. incase your wondering theres.. http://www.whatismyip.org/ , it displays nothing but your ip address.. Edited July 9, 2006 by WTS Link to comment Share on other sites More sharing options...
frank10 Posted July 9, 2006 Share Posted July 9, 2006 (edited) You can use this php with this other php-autoit combo to remotely control your remote pc (and this php tells you which ip you need to contact) with cell.See also this thread:http://www.autoitscript.com/forum/index.ph...hl=cell++remote Edited July 9, 2006 by frank10 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