note 73966 added to function.header
| From: | KKOOPORATION at gmail dot com | Date: | Sun, 18 Mar 2007 18:07:37 +0000 |
| Subject: | note 73966 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-124576@lists.php.net to get a copy of this message | ||
This is an Example of an UID based download Platform:
document 1:
<?php
if($_GET['verify']==broken){
die('Please do not leech.');
}
if($_GET['accepted']==1){
//Generate a password:
$password ="";
$pool .= "123456789";
srand ((double)microtime()*1000000);
for($index = 0; $index < 200; $index++)
{
$password .= substr($pool,(rand()%(strlen ($pool))), 1);
}
//use on a windows server:
passthru('echo '.$passwort.' >> verify.pajaxtxt');
//Use on a linux server:
//$fneu = fopen("verify.pajaxtxt","w+");
//fputs ($fneu,$password);
//fclose ($fneu);
header('location: document2.php?UID='.$password);
}
else
{
echo '<a href="?accepted=1">I accept (Insert what do you
think)</a>';
}
?>
document2:
<?php
//Check if $get exist:
if($_GET){
//Parameter for UID:
$s = $_GET['UID'];
//file definition:
$sa = file("verify.pajaxtxt");
for($i=0; $i<count($sa); $i++)
{
if (ereg($s, $sa[$i]))
{
//if verification code exist in the file:
echo "Finished!";
//end.
//
}
}
}
else
{
//Go back if the verification code does not exist in the file
header('location: document1.php?verify=broken');
//end.
}
?>
The file verify.pajaxtxt must deleted every day!
----
Server IP: 69.147.83.197
Probable Submitter: 84.190.141.148
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit -- https://master.php.net/note/edit/73966
Del: integrated -- https://master.php.net/note/delete/73966/integrated
Del: useless -- https://master.php.net/note/delete/73966/useless
Del: bad code -- https://master.php.net/note/delete/73966/bad+code
Del: spam -- https://master.php.net/note/delete/73966/spam
Del: non-english -- https://master.php.net/note/delete/73966/non-english
Del: in docs -- https://master.php.net/note/delete/73966/in+docs
Del: other reasons-- https://master.php.net/note/delete/73966
Reject -- https://master.php.net/note/reject/73966
Search -- https://master.php.net/manage/user-notes.php