As mentioned in my previous post, I've been heading up to Namibia on odd occasions for work... Although they have been rather disturbing, because (A) I don't have access to the Internet while there (other than e-mail through the exchange server) and (B) I haven't been able to get my laptop to remotely connect to my cellphone in order to access GPRS (nor get those settings to work through my phone while in Namibia).
So to bypass these little flaws in the way the security has been setup (and of course, prevent hours upon hours of utter boredom in my long day at work) I decided to write a small little PHP script to automatically deliver the content I desire to my e-mail address! The next thing I needed to do was add a little CRON job to the account and there you go! Automatic emails at specified times that allow me to view content even though I strictly don't have access to The Internet.
// your e-mail address
$to = '
This e-mail address is being protected from spambots. You need JavaScript enabled to view it
';
// the subject of your email - below will output "Slashdot articles for Tuesday, 06 Jan 2009 at 15:07:54"
$subject = 'Slashdot articles for ' . strftime("%A, %d %b %Y at %T");
// the site you want delivered to your email account - I have used slashdot below
$message = file_get_contents('http://slashdot.org');
// these headers tell your mail client how your content needs to be displayed. Don't change it!
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
// the reply address...
$headers .= "From: Slashdot E-mail sender \r\n";
// sending off your email!
if(mail($to, $subject, $message, $headers))
echo 'Mail sent';
else
echo 'Mail ! sent';
?>
The easiest thing to do is to create a CRON job to send off the mail at specific times. Alternatively, you can just send it yourself (to test, of course) or get someone else to. But CRON jobs are far more reliable than people...
Yes. Unfortunately, Google Reader will not work. Again, as I said, I do NOT have access to the Internet: I ONLY have access to Outlook. Absoluetely everything else is disconnected - you can\'t ping, tracert or do any kind of connection what so ever.
If you know of another way of bypassing these hard restrictions, let me know!
Personally, I prefer piping these things into Google Reader - this makes it accessible anywhere without filling up my mailbox