01110100110101010101011101100010
Posts tagged site
Host your Site on your own computer
Dec 29th
These days a large number of people have ADSL connections thanks to BSNL/Airtel they all have a direct internet IP, that means they can host whatevery they wish to host on the internet, It can be blog, site etc on their ip but as far a i know they are all dynamic IP’s so they keep on changing after few hours and its a trouble telling everyone you updated IP, i was trying to solve this problem for one of my friends and the solution is simple i made a simple php file which is hosted on a free php host, he sends a simple get request every 30mins to update his IP which is written to a file and stored on the server (most free hosts does not offer mysql databases, otherwise they could also be used) when someone visits the url of the free host he is redirected to his machine ip, he is running Fedora 9 as the server (but windows can also be used.. which i wont recommend if you are going to tell the world what your IP is) here is the code save it as index.php
<?php
ob_start();
$file = "ip";
if (isset($_GET['pass']) and ($_GET['pass'] == "yourpassword"))
{
$sip=$_SERVER['REMOTE_ADDR'];
unlink('ip');
$fw = fopen($file,'w');
fwrite($fw,$sip);
fclose($fw);
echo "Done";
}
else
{
$fr = fopen($file,'r');
$ip = fgets($fr);
fclose($fr);
header("Location: http://$ip");
}
ob_end_flush();
?>
you can update you IP by going to ” http://something.some-free-host.com/index.php?pass=yourpassword ” from your browser
i will recommend changing yourpassword to something no one can guess and run the following python script to update your IP every 30 mins
import urllib
import time
url = "http://something.some-free-host.com/index.php?pass=yourpassword"
while (1):
urllib.urlopen(url)
print "IP submited at", time.ctime()
time.sleep(1800)
print "submitting again"
PS – if not sites or blogs it will definitely be useful to control your torrents from anywhere, by using their web interfaces, Ktorrent, utorrent and others offers them
Accessing any site blocked by sonic wall!!!
Aug 26th
Removed because of objection form ION
old text avaliable here



