[PHP/Probably Javascript]Remote Form Submit

All is well...
Loyal Member
Joined
Feb 22, 2006
Messages
1,520
Reaction score
0
I'm looking to submit a form on a different site with a variable then save the source of the resulting page to a variable.

I'm thinking that Javascript will be needed to submit the form with the variable (of the user's choice) and I was hoping it can be partly done with php since I'm trying to learn as much as I can with it.

I hate to ask for help but I'm pretty stuck lol

Summary:
Submit a form (I have no direct source access to) with another script hosted (I have access to) in a different place than the form. <- I can't do right now lol
After which, the source is captured (plain html output) <- I can do
 
Last edited:
You want javascript to submit a form on another website?

You can't.

Being able to do so would mean a HUGE security risk. Javascript can ever only work on the website / domain it is invoked on.

You could maybe load the website yourself with CURL and submit then, but that would mean the source is your website and I'm guessing you're trying to get something to automatically vote for your site, and almost all votingsites log IP adresses (at least, mine does) and won't let you.

You have one shot at it and that is by sourceinjecting the site with the form. There are ways to do so, but that's hacking and I won't tell you how to.
 
Actually you're a little off lol
I'm making a signature maker. The form that will be submitted will have the name of the character as the submitted variable and the resulting source of the page will have that character on it with all its info.

I looked into cURL but it's not source I have access to =(


PHP:
$source = file_get_contents("http://site.com");
$source = eregi_replace('Ranking.aspx','http://site.com/Ranking.aspx',$source);
$source = eregi_replace('/JS/','http://site.com/JS/',$source);
Is what I'm kinda starting with lol
If I can get it to submit somehow within the page instead of going back to site.com (example).
I was thinking of submitting it then opening it within something like a frame but closer to an include (since it merges the html source). So basically all I need to know (kinda) is how to get the source of an iframe that's on a page currently.

Submit a form with a remote action and keep the html source local sums up what I need lol
 
Back