quote:
Originally posted by roflmao456
code:
<?php
if($_POST['status']){
file_put_contents("currentstatus.txt",$_POST['status']); // PHP 5 required for this. otherwise use "fclose(fwrite(fopen("currentstatus.txt","w"),$_POST['status']));"
// done..
}
?>
I personally prefer the code below created by me
[code]<?php
if($_POST['status'])
{
if($_SERVER['REMOTE_ADDR'] == "IP ADDRESS HERE")
{
$file = fopen("status.txt", "w");
fwrite($file, $_POST['status']);
fclose($file);
}
else
{
echo("Sorry, you are not permitted to view this page.");
}
}
?>