drtrann Posted December 14, 2012 Share Posted December 14, 2012 (edited) hey guys,i know there are a few similar posts about this topic, but i cant seem to wrap my head around why this isnt working, and when trying the other examples i have found, they dont work either.so im trying to create an a app that queries a Mysql database through a php script. right now I'm just trying to get a connection between the PHP script and the autoit program, so i've just made a small script that sends and "should" return the value that I sent the PHP file.basic autoit script:#include <Inet.au3> Local $data $data= InetRead("www.WEBSITE.com/authorization.php?email=YOUREMAIL") $themsg = BinaryToString($data) MsgBox(0,"", $themsg)basic php<?php$msg = $_GET ["email"];echo $msg;?>from my basic understanding, this should return the value of email=, and it does in a web browser, but it returns at "" in autoit. im sure i've fundimentally missed something, but i cant for the life of me figure it out. i'd appreciate if someone pointed out where i've messed up. thank you Edited December 14, 2012 by drtrann Link to comment Share on other sites More sharing options...
JohnOne Posted December 14, 2012 Share Posted December 14, 2012 $data= InetRead("www.WEBSITE.com/authorization.php?email=YOUREMAIL",1) ; 1 = force reload AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
drtrann Posted December 14, 2012 Author Share Posted December 14, 2012 $data= InetRead("www.WEBSITE.com/authorization.php?email=YOUREMAIL",1) ; 1 = force reload this still seems to be returning nothing Link to comment Share on other sites More sharing options...
FireFox Posted December 14, 2012 Share Posted December 14, 2012 @drtrann It's quite simple, test your page with a browser and if it's working use _INetGetSource. I suggest you to use TCP sockets which is faster. (I can write you a code for it). Br, FireFox. Link to comment Share on other sites More sharing options...
drtrann Posted December 14, 2012 Author Share Posted December 14, 2012 (edited) @drtrannIt's quite simple, test your page with a browser and if it's working use _INetGetSource.I suggest you to use TCP sockets which is faster. (I can write you a code for it).Br, FireFox.hey firefox,i have been trying the read/getsource codes, but none of them seem to return the value (but using it in a browser does). the message box always returns empty. I would greatly appreciate an alternative method for how to achieve this. Edited December 14, 2012 by drtrann Link to comment Share on other sites More sharing options...
bogQ Posted December 14, 2012 Share Posted December 14, 2012 (edited) i just tested your script from first post and it works with no problem. the php file<?php if (isset($_GET['email'])) {if ($_GET['email'] == 'YOUREMAIL') { echo 'mymail@gmail.com';}} ?>retyrn on msgbox from autoit mymail@gmail.comso there isnt anything wrong with it. try restaritng your comp maybe?can you post output source from browser when you copy paste that adress directly?Is your site hosted on the compyter where your using autoit script? Edited December 14, 2012 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
drtrann Posted December 14, 2012 Author Share Posted December 14, 2012 (edited) i just tested your script from first post and it works with no problem. the php file <?php if (isset($_GET['email'])) {if ($_GET['email'] == 'YOUREMAIL') { echo 'mymail@gmail.com';}} ?> retyrn on msgbox from autoit mymail@gmail.com so there isnt anything wrong with it. try restaritng your comp maybe? can you post output source from browser when you copy paste that adress directly? Is your site hosted on the compyter where your using autoit script? im still recieving no return what so ever. restarting didnt do anything no the autoit script is not on the same computer as the web server pasting the link directly into the browser works php file output source <html> <head> </head> <body>mymail@gmail.com</body> </html> Edited December 14, 2012 by drtrann Link to comment Share on other sites More sharing options...
bogQ Posted December 14, 2012 Share Posted December 14, 2012 (edited) well thats strange tell you what, i'll provide you a link on private message on forum, to the webpage im gona host in next 24h for testing, it will hold the php script i posted on my first post. Please use link form PM in autoit script that you posted on your first original post, and see if youl get any respond from it. And if you can please provide correct link and original php script to your web page on pm if you wish for me to test your page from the point i stand (in the morning when drinks whare off, im off to sleep for tonight ). Edited December 15, 2012 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
drtrann Posted December 15, 2012 Author Share Posted December 15, 2012 so apparently I'm and idiot and didn't code in the Http:www. soon as i added that it started to work. thanks for all the help guys (again im an idiot) 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