BJJ Posted February 2, 2009 Share Posted February 2, 2009 Hi How can i send data frome imputbox to php script on www server use http (POST) Link to comment Share on other sites More sharing options...
AzKay Posted February 2, 2009 Share Posted February 2, 2009 http://www.autoitscript.com/forum/index.ph...=Search&f=2HTTP. Search. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
BJJ Posted February 2, 2009 Author Share Posted February 2, 2009 I know how work Search function but if i make post i dont find nothing about send to PHP on web page Link to comment Share on other sites More sharing options...
BJJ Posted February 3, 2009 Author Share Posted February 3, 2009 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 More sharing options...
BrettF Posted February 3, 2009 Share Posted February 3, 2009 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 Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
BJJ Posted February 3, 2009 Author Share Posted February 3, 2009 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 More sharing options...
BrettF Posted February 3, 2009 Share Posted February 3, 2009 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. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
BJJ Posted February 3, 2009 Author Share Posted February 3, 2009 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 More sharing options...
AzKay Posted February 4, 2009 Share Posted February 4, 2009 Whats your php script? # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
BrettF Posted February 4, 2009 Share Posted February 4, 2009 Congratulations on searching it awesomely We will need to see the PHP source (or just the form), to help you finish it... Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
BJJ Posted February 4, 2009 Author Share Posted February 4, 2009 (edited) 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 February 4, 2009 by Quzziy Link to comment Share on other sites More sharing options...
BJJ Posted February 5, 2009 Author Share Posted February 5, 2009 some Idea ?? Link to comment Share on other sites More sharing options...
BrettF Posted February 5, 2009 Share Posted February 5, 2009 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 Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
BJJ Posted February 5, 2009 Author Share Posted February 5, 2009 That's working Greate Thanks 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