|
Mon, Nov 26, 2007
![[Link]](http://geekblog.oneandoneis2.org/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>
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| << < | > >> | |||||
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 | |||