| « Highly trained scientists | Naughty but nice.. » |
Mon, Nov 26, 2007
![[Icon]](rsc/img/chain_link.gif)
There's a phrase that's been around for some time: The Internet interprets censorship as damage and routes around it
Firewalls have been really, REALLY hacking me off lately. Heavy-handed "lock down everything" attitudes have always gotten on my nerves. Today, I couldn't take any more: There was a page I *had* to get a look at, and the bloody firewall refused point-blank to let it.
So.. The problem: Direct access of a page is impossible
Resources: A webserver that can be accessed only via FTP, a certain amount of geeky knowledge
Limitations: Too damn busy to learn any programming languages properly
The solution: FTP a bit of PHP that uses wget to grab the web page you're after and save it as a new page on your own webserver. Simple, crude, primitive, etc. But what the hell, it worked. I got a huge sense of triumph as I watched the blocked page appear on my screen :)
<head>
<meta http-equiv="REFRESH" content="0;
url=http://www.oneandoneis2.org/file.html">
<title>Mirror, Mirror</title>
</head>
<body bgcolor="#ffffff" vlink="#0000ff" alink="#ff0000">
<?php
$foo = system('wget webpage -O ~/public_html/file.html',$output);
echo "<p>Working on it</p>";
?>
</body>
Somebody with more time to learn PHP than me could make this much more all-singing and all-dancing. And I daresay that setting up a proper proxy server on my web page could make the whole thing redundant. But for ten minutes work with nothing but a text editor and the default Windows FTP client, I reckon that's not bad :)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>wget-based mirroring frontend</title>
</head>
<body>
<form action="access.php" method="post">
<h1>Webpage URL:<br />
<input name="url" size="35" type="text" /><br />
<input value="Load Page" type="submit" /></h1>
</form>
</body>
</html><head>
<meta http-equiv="REFRESH" content="0;
url=http://www.oneandoneis2.org/file.html">
<title>Mirror, Mirror</title>
</head>
<body bgcolor="#ffffff">
<?php
$foo = system('wget '.$_POST["url"].' -O ~/public_html/file.html',$output);
echo "<p>Working on it</p>";
?>
</body>![[Links]](http://geekblog.oneandoneis2.org/skins/112/rsc/img/chain_link.gif)
Hmm.. new look for twitter? I hope it gets less "Ick! Change! Put it back!" nonsense than Facebook..
08/02/12
Facebook Syndication Error
11/02/12
![]()
I last listened to:
Johann Pachelbel - Canon in D major
Most recent photo:
Submersible houseboat