Jump to content

Stay Logged In When Im Offline Using PHP


JayLewis

Recommended Posts

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

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 handle
curl_setopt($ch, CURLOPT_URL,$url); // set url to post to
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);// allow redirects
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable
curl_setopt($ch, CURLOPT_TIMEOUT, 3); // times out after 4s
curl_setopt($ch, CURLOPT_POST, 1); // set POST method
curl_setopt($ch, CURLOPT_POSTFIELDS, "remember=1&login_submit=1&user=Jay69&password=Jay69"); // add POST fields
curl_setopt($ch, CURLOPT_URL,$url2);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable
curl_setopt($ch, CURLOPT_POST, 1); // set POST method
curl_setopt($ch, CURLOPT_POSTFIELDS, "raidid=3668760"); // add POST fields
$result = curl_exec($ch); // run the whole process
curl_close($ch);
echo $result;
?>[/code]

or not ... :P

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.