Jump to content

how to send data to server


BJJ
 Share

Recommended Posts

this is a my page

http://www.quzziy.za.pl/index.php

when you write some text in a box and send this text write on xxx.txt file in the server

i try send some text to this index.php witch AutoIt program

Please help

Link to comment
Share on other sites

Well its obvious you don't know enough about the page you wish to submit data to, or how to use the search.

FYI, search for a HTTP post. So until then, you fail at searching.

Brett

Link to comment
Share on other sites

i make this page , I think i dont must use login procedure becaouse i dont upload file to sarver only send data to this php script

Ps. I read a million and one titles about HTTP , send to php , FTP ect.

Link to comment
Share on other sites

You fail at searching. First off your attitude to getting this complete is wrong. You should at least try. So far you haven't. You say you've searched, I really don't think you have even tried. I haven't bothered looking too hard at the page, but I can see you have a form. I suspect you either use POST or GET when you submit the form correct? Well then have a look at submitting HTTP post and GET requests. Search for that. And then when you're done with your answer in front of your face, post back here and say how you should have searched... Because reading the titles doesn't cut it, you have to read the posts as well...

Cheers,

Brett

P.S- Lesson 2 is that not many people will go out of their way to write scripts from scratch.

Link to comment
Share on other sites

yes I tried and I read very much post's what i find in tag " PHP , HTTP , send , post , get , WGET , CURL , FTP , server "

But I have a hold-up becaouse I frome Poland and my English don't be good nvm.

I translate your post :)

So i found some examples frome other post in the forum

#include <HTTP.au3>
$from = "JOE"
$number = "***-***-****"
$msg = "hi"

$host = "quzziy.za.pl"
$page = "/index.php"
$vars = "trackResponses=No&Send.x=Yes&DOMAIN_NAME=@tmomail.com&min=" & $number & "&require_sender=" & $from & "&text=" & $msg & "count=" & 140-StringLen($msg) & "&msgTermsUse=1"

$data = _HTTPEncodeString($vars)
ConsoleWrite($data & @CRLF)
$socket = _HTTPConnect($host, 443)
$post = _HTTPPost($host, $page, $socket, $data)
ConsoleWrite(@error & @CRLF)
$recv = _HTTPRead($socket,1)
FileWrite( @ScriptDir & "\result.html", $recv[4] )oÝ÷ Úw±µ«­¢+ØÀÌØí½!QQ@ô=©
ÉÑ ÅÕ½ÐíÝ¥¹¡ÑÑÀ¹Ý¥¹¡ÑÑÁÉÅÕÍиԸÄÅÕ½Ðì¤)
½¹Í½±]ɥѡ}!QQAIÅÕÍÐ ÀÌØí½!QQ@°ÅÕ½ÐíA=MPÅÕ½Ðì°ÅÕ½Ðí¡ÑÑÀè¼½ÝÝܹÅÕéé¥ä¹é¹Á°½¥¹à¹Á¡ÀÅÕ½Ð줵Àì
I1¤()Õ¹}!QQAIÅÕÍÐ ÀÌØí½!QQ@°ÀÌØí½5Ñ¡½°ÀÌØí½UI0°ÀÌØí½ÑôÅÕ½Ðí­ÕÉÝÅÕ½Ðì¤(ÀÌØí½!QQ@¹=Á¸ ÀÌØí½5Ñ¡½°ÀÌØí½UI0°±Í¤(%ÀÌØí½5Ñ¡½ôÅÕ½ÐíA=MPÅÕ½ÐìQ¡¸ÀÌØí½!QQ@¹MÑIÅÕÍÑ!È ÅÕ½Ðí
½¹Ñ¹ÐµQåÁÅÕ½Ðì°ÅÕ½ÐíÁÁ±¥Ñ¥½¸½àµÝÝܵ½É´µÕɱ¹½ÅÕ½Ðì¤(ÀÌØí½!QQ@¹M¹ ÀÌØí½Ñ¤(IÑÕɸÀÌØí½!QQ@¹IÍÁ½¹ÍQáÐ)¹Õ¹oÝ÷ Úw±µ«­¢+Ø¥¹±Õ±Ðí%¹ÔÌÐì(¥¹±Õ±ÐíÉÉä¹ÔÌÐì(¥¹±Õ±ÐíU%
½¹ÍѹÑ̹ÔÌÐì()¥´ÀÌØíÕÉ°°ÀÌØíÁ½ÍÑÑ((ÀÌØíÕÉ°ôÅÕ½Ðí¡ÑÑÀè¼½ÝÝܹÅÕéé¥ä¹é¹Á°½¥¹à¹Á¡ÀÅÕ½Ðì(ÀÌØíÁ½ÍÑÑôÅÕ½ÐíͽµµÍÍÅÕ½Ðì((ÀÌØí½%¹ÑɹÐô}%
ÉÑ ÀÌØíÕÉ°±±Í±QÉÕ¤(ÀÌØí½%¹Ñɹй¹Ù¥Ñ ÀÌØíÕÉ°°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÀÌØíÁ½ÍÑѤ)}%1½]¥Ð ÀÌØí½%¹ÑɹФ

But i think this example didn't a good way to solution my problem

i think this function send data to page but dont inject text to php script becaouse this script dont save my message , so dont take this data

Link to comment
Share on other sites

Link to comment
Share on other sites

Source frome PHP

<?php

if(empty($_POST['temat'])&&empty($_POST['tresc'])){

?>

<form action="index.php" method="post">
Msg <textarea name="tresc"></textarea><br />
<input type="submit" value="Wyslij" />
</form>
<?php

}else{
$temat = $_POST['temat'];
$temat = addslashes($temat); 
$tresc = $_POST['tresc'];
$tresc = addslashes($tresc);

$do_zapisu = $temat."\n".$tresc."\n\n";

$fp = fopen('dane.txt', 'a');

fwrite($fp, $do_zapisu);

fclose($fp);

}
?>
Edited by Quzziy
Link to comment
Share on other sites

HTTP.au3 should have it covered, and it should be very similar to what you have.

Try something like this:

#include <HTTP.au3>
$from = "JOE"
$number = "***-***-****"
$msg = "hi"

$host = "quzziy.za.pl"
$page = "/index.php"
$vars = "tresc=" & $number & @CRLF & $from & @CRLF & $msg

$data = _HTTPEncodeString($vars)
ConsoleWrite($data & @CRLF)
$socket = _HTTPConnect($host, 80)
$post = _HTTPPost($host, $page, $socket, $data)
ConsoleWrite(@error & @CRLF)
$recv = _HTTPRead($socket,1)
FileWrite( @ScriptDir & "\result.html", $recv[4] )

Just an example. If you have any questions about what the code is doing, just ask :)

Cheers,

Brett

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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