justin813 Posted November 28, 2010 Share Posted November 28, 2010 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 Quote Link to comment Share on other sites More sharing options...
MatthewJ Posted November 28, 2010 Share Posted November 28, 2010 if($loginsuccess) { header("Location: www.yoursite.com/page2.php"); } Quote Link to comment Share on other sites More sharing options...
justin813 Posted November 28, 2010 Author Share Posted November 28, 2010 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. Quote Link to comment Share on other sites More sharing options...
Sleeper Posted November 28, 2010 Share Posted November 28, 2010 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. Quote Link to comment Share on other sites More sharing options...
justin813 Posted November 29, 2010 Author Share Posted November 29, 2010 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. Quote Link to comment 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.