openaidbh
BANNED
- Mar 3, 2012
- 328
- 323
For those of you looking to incentivize CPA offers with instant-wins, or have any other use for an instant win script, here you go. It's quick and dirty, I wrote it with a limited knowledge of PHP but it works.
How it works:
The system randomly generates a number between 1 and 334,000 . If that number is 777, they win and are redirected to the win page and you're sent an email with the time/date of the win (I didn't feel like messing with an SQL database or any such nonsense). If not, they're sent to the lose page. Of course, you can tool with the numbers to suit your needs. Quick, easy, effective.
You're welcome!
PHP:
<?php
$s = rand(1,334000);
$date = date("l, F jS Y - H:i:s");
if ($s !== 77)
header("Refresh: 5; [yourdomainhere]/notawinner");
if ($s == 7) {
$to = "[youremailaddresshere]";
$subject = "WINNER: #" .$s. " at " .$date. "!";
$body = "Winner winner chicken dinner #" .$s. "!";
if (mail($to, $subject, $body)) {
echo("<p>!</p>");
} else {
echo("<p>...</p>");
}
header( 'Location: [yourdomainhere]/winner' ) ;
}
?>
How it works:
The system randomly generates a number between 1 and 334,000 . If that number is 777, they win and are redirected to the win page and you're sent an email with the time/date of the win (I didn't feel like messing with an SQL database or any such nonsense). If not, they're sent to the lose page. Of course, you can tool with the numbers to suit your needs. Quick, easy, effective.
You're welcome!