Jump to content

Redirect after form is submitted to another site


justin813

Recommended Posts

I have an account on theirsite.com and I want to be able to submit my login credentials from mysite.com/page1.php and then redirect back to mysite.com/page2.php.

 

I've been Googling for hours now and nothing I can find works and I don't know a thing about cURL and would rather not get into it. Not to mention, I'm using free hosting for now and I don't believe I'm able to use cURL anyways.

 

I can get it to log in with the credentials just fine, that's no problem, but I just have no clue how to get it to redirect back to my page or just send the credentials and then staying on my page because I could work with that as well (send credentials to theirsite.com from mysite.com/page1.php and staying on mysite.com/page1.php).

 

Is there anyone that could give me a hand on how to do this without using cURL since my php.ini is not editable?

 

Thanks

Link to comment
Share on other sites

Right now, all I have on my site is:

 


        <form action="http://www.theirsite.com/forum/ucp.php?mode=login" method="post">
	<table cellspacing="0">
	    <tr>
	        <td>Username:</td>
	        <td><input class="post" type="text" name="username" size="10" style="width: 75px" /></td>
	    </tr>
	    <tr>
	        <td>Password:</td>
	        <td><input class="post" type="password" name="password" size="10" style="width: 75px" /></td>
	        <td><input type="submit" name="login" value="Login" /></td>
	    </tr>
	</table>
</form>

 

I'm not too sure how to implement that bit into what I have right now.

Link to comment
Share on other sites

Let me see if I understand this.

 

You want a form on your site that will submit to a site owned by someone else, and then redirect back to your site?

 

If that's what you mean I don't believe that is possible, unless you own the other site to code the return from. Not even sure in what way that would be legally beneficial.

Link to comment
Share on other sites

The purpose is to be able to screen scrape information from the members list (the user ID) and then use the ID to visit that members page and scrape information from that page as well. I've been a member on that forum almost a year and have talked to one of the owners and he has given me the okay to do what it is I'm wanting to do, but without having to edit the site in a way that would cause other members issues. I already have the code written to screen scrape and I've gathered information of another site that I needed to scrape from, but when I tried scraping the forum, even if I'm logged in on another tab, it requires me to log in and I can tell that based on what is scraped.

 

So I need to be able to log in and then redirect to my other page or even the same page, so that once it's logged in, it can then scrape the information I need and like I've said, I've been given consent to do the scraping.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.