Jump to content

Recommended Posts

Posted

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.au3

but 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.

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...