HaLo2FrEeEk Posted August 24, 2008 Share Posted August 24, 2008 Hi. I have a need to recursively submit a POST form to an external website (can I do that, first off). I'm thinking it'll be as simple as setting the action to the external site, but I don't know. Basically the information being passed is a password and a decode key (6 characters, completely random, a total of 720 combinations). The reason for this is that if one can find all the hidden characters on the site, and put in the proper code (out of the 720) they get something special, and I don't feel like entering 720 codes manually. Could I submit this form from my site, to their site, without any trouble? And second, how would I go about doing it? I have the page it's being submitted to, the password, and all 720 decode key combinations (in an array). How would I iterate the array and submit the form as a POST form for every one? I know I can do foreach to iterate that, but I don't know how to submit via POST without building the form and using Javascript to sumbit it. I can guarantee on my life that this is not malicious, I own a site so I wouldn't do something like that to another, especially this one, this one's a really fun game. I just don't want to enter each one of the 720 codes manually until I get it, especially because I have to enter my password every time. Link to comment https://forums.phpfreaks.com/topic/121070-recursively-submitting-a-post-form/ Share on other sites More sharing options...
ibechane Posted August 24, 2008 Share Posted August 24, 2008 You can use CURL to have your server send POST data on your behalf. It's not too hard, but you do have to go into your server's php.ini to enable the CURL extension (search the file for curl) so you can use it, since it's off by default. I'm not going to post the code because it's a lot to explain, but if you search CURL and POST on Google, you'll find your answer eventually. Link to comment https://forums.phpfreaks.com/topic/121070-recursively-submitting-a-post-form/#findComment-624136 Share on other sites More sharing options...
HaLo2FrEeEk Posted August 24, 2008 Author Share Posted August 24, 2008 I have cURL, and I have a class called Snoopy that uses cURL but in a really neat way in that you don't have to get your eyes dirty with all the weird code (cURL code is weird, don't deny it). Snoopy makes everything clean, I just wasn't sure that's what I needed. I'll look throught he class to see if there's anything I can use. I'll get back if I need more help. Thank you. Link to comment https://forums.phpfreaks.com/topic/121070-recursively-submitting-a-post-form/#findComment-624139 Share on other sites More sharing options...
HaLo2FrEeEk Posted August 24, 2008 Author Share Posted August 24, 2008 Ok, silly me, I didn't stop to think that it was my computer logged into the site and NOT my server. Is there a way to find out which session variables or cookies this site is using (I'm pretty sure there are no cookies, just session variables), I can set them in Snoopy. I found out how to submit a form, but It won't work if snoopy can't authenticate my server as a user, it just kicks me back to the login page. Link to comment https://forums.phpfreaks.com/topic/121070-recursively-submitting-a-post-form/#findComment-624142 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.