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! Link to comment https://forums.phpfreaks.com/topic/24446-stay-logged-in-when-im-offline-using-php/ 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]. Link to comment https://forums.phpfreaks.com/topic/24446-stay-logged-in-when-im-offline-using-php/#findComment-111296 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! Link to comment https://forums.phpfreaks.com/topic/24446-stay-logged-in-when-im-offline-using-php/#findComment-111300 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! Link to comment https://forums.phpfreaks.com/topic/24446-stay-logged-in-when-im-offline-using-php/#findComment-111301 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? Link to comment https://forums.phpfreaks.com/topic/24446-stay-logged-in-when-im-offline-using-php/#findComment-111304 Share on other sites More sharing options...
printf Posted October 19, 2006 Share Posted October 19, 2006 is cookie or url based?me! Link to comment https://forums.phpfreaks.com/topic/24446-stay-logged-in-when-im-offline-using-php/#findComment-111306 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 Link to comment https://forums.phpfreaks.com/topic/24446-stay-logged-in-when-im-offline-using-php/#findComment-111308 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! Link to comment https://forums.phpfreaks.com/topic/24446-stay-logged-in-when-im-offline-using-php/#findComment-111315 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! Link to comment https://forums.phpfreaks.com/topic/24446-stay-logged-in-when-im-offline-using-php/#findComment-111317 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 Link to comment https://forums.phpfreaks.com/topic/24446-stay-logged-in-when-im-offline-using-php/#findComment-111342 Share on other sites More sharing options...
JayLewis Posted October 19, 2006 Author Share Posted October 19, 2006 :) Link to comment https://forums.phpfreaks.com/topic/24446-stay-logged-in-when-im-offline-using-php/#findComment-111416 Share on other sites More sharing options...
JayLewis Posted October 19, 2006 Author Share Posted October 19, 2006 email the solution to:[email protected]or[email protected]ThanksJenette! Link to comment https://forums.phpfreaks.com/topic/24446-stay-logged-in-when-im-offline-using-php/#findComment-111434 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? Link to comment https://forums.phpfreaks.com/topic/24446-stay-logged-in-when-im-offline-using-php/#findComment-111996 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.