JayLewis Posted October 19, 2006 Share Posted October 19, 2006 I am trying to find a way to stay logged into a website when i go offline.Using my webspace i want to upload a script that i can execute and will log me into the desired website.Becuase my host ever goes offline, the script will be running keeping me online ...is this possible?Thanks.Jay! Quote Link to comment Share on other sites More sharing options...
trq Posted October 19, 2006 Share Posted October 19, 2006 Yeah its possible. Maybe take a look at [url=http://php.net/curl]curl[/url]. Quote Link to comment Share on other sites More sharing options...
JayLewis Posted October 19, 2006 Author Share Posted October 19, 2006 thanks,but did i mention im a total n00b when it comes to PHP? :Pa little bit of guidence wud be nice if you have the time...Thanks,Jay! Quote Link to comment Share on other sites More sharing options...
printf Posted October 19, 2006 Share Posted October 19, 2006 ya, login, grab the session cookie or the session id in the url, then begin a socket refresh loop with a sleep interval using a place holder, so when you want to exit the loop, you delete the place holder!me! Quote Link to comment Share on other sites More sharing options...
JayLewis Posted October 19, 2006 Author Share Posted October 19, 2006 how should i grab the session ID? Quote Link to comment Share on other sites More sharing options...
printf Posted October 19, 2006 Share Posted October 19, 2006 is cookie or url based?me! Quote Link to comment Share on other sites More sharing options...
JayLewis Posted October 19, 2006 Author Share Posted October 19, 2006 http://82.42.115.70/site/base.phptake a look yourself mateUsername: JayLewisPassword: jcity Quote Link to comment Share on other sites More sharing options...
printf Posted October 19, 2006 Share Posted October 19, 2006 I have to go to a board meeting right now, but when I get back I will write you a quick script to do this!me! Quote Link to comment Share on other sites More sharing options...
JayLewis Posted October 19, 2006 Author Share Posted October 19, 2006 thank you very much!!much appreciated!Thanks,Jay! Quote Link to comment Share on other sites More sharing options...
JayLewis Posted October 19, 2006 Author Share Posted October 19, 2006 something like this?[code]<?php$url = "http://82.42.115.70/index.php";$url2 = "http://82.42.115.70/site/base.php";$ch = curl_init(); // initialize curl handlecurl_setopt($ch, CURLOPT_URL,$url); // set url to post tocurl_setopt($ch, CURLOPT_FAILONERROR, 1);curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);// allow redirectscurl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variablecurl_setopt($ch, CURLOPT_TIMEOUT, 3); // times out after 4scurl_setopt($ch, CURLOPT_POST, 1); // set POST methodcurl_setopt($ch, CURLOPT_POSTFIELDS, "remember=1&login_submit=1&user=Jay69&password=Jay69"); // add POST fieldscurl_setopt($ch, CURLOPT_URL,$url2);curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variablecurl_setopt($ch, CURLOPT_POST, 1); // set POST methodcurl_setopt($ch, CURLOPT_POSTFIELDS, "raidid=3668760"); // add POST fields$result = curl_exec($ch); // run the whole processcurl_close($ch); echo $result;?>[/code]or not ... :P Quote Link to comment Share on other sites More sharing options...
JayLewis Posted October 19, 2006 Author Share Posted October 19, 2006 :) Quote Link to comment Share on other sites More sharing options...
JayLewis Posted October 19, 2006 Author Share Posted October 19, 2006 email the solution to:Jay_Lewis69@hotmail.comorNetty2oo6@hotmail.comThanksJenette! Quote Link to comment Share on other sites More sharing options...
JayLewis Posted October 20, 2006 Author Share Posted October 20, 2006 so is there nobody who can help me? 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.