sungo Posted January 24, 2009 Share Posted January 24, 2009 Hey guys, kinda new to PHP here. I am trying to play around with retrieving data from a website via CGI. I can do this with the HTML POST form: <FORM ACTION="/cgi-bin/kashi.cgi" METHOD="POST"> <INPUT NAME="file_no" value="29638"> <INPUT NAME="idkdk" value="klflg;fl"> <INPUT type="submit" value="Send"> </FORM> Is there any way to automate this with PHP so I don't have to press a submit button and it just auto load the data? Quote Link to comment https://forums.phpfreaks.com/topic/142294-newb-question-about-_post/ Share on other sites More sharing options...
DeanWhitehouse Posted January 24, 2009 Share Posted January 24, 2009 Ajax? Quote Link to comment https://forums.phpfreaks.com/topic/142294-newb-question-about-_post/#findComment-745551 Share on other sites More sharing options...
rubing Posted January 24, 2009 Share Posted January 24, 2009 php is used on the server. maybe curl? Quote Link to comment https://forums.phpfreaks.com/topic/142294-newb-question-about-_post/#findComment-745556 Share on other sites More sharing options...
DeanWhitehouse Posted January 24, 2009 Share Posted January 24, 2009 Lol ,that is what Ajax is used for to run php pages on the server. Quote Link to comment https://forums.phpfreaks.com/topic/142294-newb-question-about-_post/#findComment-745559 Share on other sites More sharing options...
sungo Posted January 24, 2009 Author Share Posted January 24, 2009 It's cross server. So I'd be running the script on my server to POST to the other server to grab the data. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/142294-newb-question-about-_post/#findComment-745560 Share on other sites More sharing options...
genericnumber1 Posted January 24, 2009 Share Posted January 24, 2009 You can do post requests in your scripts with cURL http://us3.php.net/curl Quote Link to comment https://forums.phpfreaks.com/topic/142294-newb-question-about-_post/#findComment-745566 Share on other sites More sharing options...
rubing Posted January 24, 2009 Share Posted January 24, 2009 Hey I already said curl. You're stealing my answer!! Quote Link to comment https://forums.phpfreaks.com/topic/142294-newb-question-about-_post/#findComment-745578 Share on other sites More sharing options...
sungo Posted January 24, 2009 Author Share Posted January 24, 2009 Haha. Ok. Thanks. I'll check that out. Appriciate the input. Quote Link to comment https://forums.phpfreaks.com/topic/142294-newb-question-about-_post/#findComment-745580 Share on other sites More sharing options...
genericnumber1 Posted January 24, 2009 Share Posted January 24, 2009 Hey I already said curl. You're stealing my answer!! But he re-asked! I figured a re-answer was in order I added a link if that counts for anything... Quote Link to comment https://forums.phpfreaks.com/topic/142294-newb-question-about-_post/#findComment-745581 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.