darzanmihai Posted February 24, 2009 Share Posted February 24, 2009 I whant to make an application to send data to a .php file with POST command but I do not know how.I have made an atempt to make the .php file:<?php$mesaj = "Nume: ".@$_POST["data"]."<br>";$fp = fopen("EmailData.txt", "a");fwrite($fp, $mesaj."||");fclose($fp);echo "&ok=ok&";?>,but I do not know how to sent data with autoit to the @$_POST from the php file...I have tryed:#include <HTTP.au3> $resp = _HTTPPost("www.digitalenergy.ro", "/AutoTeamViewer/send.php", 20, "merge") MsgBox(0,@error,$resp) HTTP.au3 from : HTTP.au3but it does not work...I get @error=2, but anyway, I am not sure this is the way to do it. I do not like stupid and idiot people that write idiot things...If you are one, do not write. Link to comment Share on other sites More sharing options...
darzanmihai Posted February 24, 2009 Author Share Posted February 24, 2009 Any Ideea..someone? I do not like stupid and idiot people that write idiot things...If you are one, do not write. Link to comment Share on other sites More sharing options...
jvanegmond Posted February 24, 2009 Share Posted February 24, 2009 Use GET method. Much simpler. github.com/jvanegmond Link to comment Share on other sites More sharing options...
darzanmihai Posted February 24, 2009 Author Share Posted February 24, 2009 Use GET method. Much simpler.do you have am example? I do not like stupid and idiot people that write idiot things...If you are one, do not write. Link to comment Share on other sites More sharing options...
jvanegmond Posted February 24, 2009 Share Posted February 24, 2009 PHP File: <?php $mesaj = "Nume: ".@$_REQUEST["data"]."<br>"; $fp = fopen("EmailData.txt", "a"); fwrite($fp, $mesaj."||"); fclose($fp); echo "&ok=ok&"; ?> AutoIt: InetGet("www.digitalenergy.ro/AutoTeamViewer/send.php?data=lolhacks") See ? github.com/jvanegmond Link to comment Share on other sites More sharing options...
darzanmihai Posted February 24, 2009 Author Share Posted February 24, 2009 PHP File: <?php $mesaj = "Nume: ".@$_REQUEST["data"]."<br>"; $fp = fopen("EmailData.txt", "a"); fwrite($fp, $mesaj."||"); fclose($fp); echo "&ok=ok&"; ?> AutoIt: InetGet("www.digitalenergy.ro/AutoTeamViewer/send.php?data=lolhacks") See ? Thx for reply. The php code worked perfectly when executed from the browser but the autoit code doesn't work and return 0. Is there something else I could try? I do not like stupid and idiot people that write idiot things...If you are one, do not write. Link to comment Share on other sites More sharing options...
jvanegmond Posted February 24, 2009 Share Posted February 24, 2009 (edited) Try this please:InetGet("http://www.digitalenergy.ro/AutoTeamViewer/send.php?data=lolhacks","result.txt") $data = FileRead("result.txt") MsgBox(0, "Result", $data )Edit: I tested on http://www.digitalenergy.ro/ but it doesn't work. Verify that this isn't your problem. Edited February 24, 2009 by Manadar github.com/jvanegmond 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