Hello, my script is giving me headache for two days. I have a paid to click site, when user clicks on paid links my script displays surf page, where i have a timer and an iframe that displays sponsored site below the timer. After the timer loads users have to pass captcha and after that success icon shows up. I wanted to change this success icon into redirecting to sponsored site and braking my frame.
So far i am very close but i'm bad at javascript and php so i probably have some noob mistakes.
View.php is the page where users see timer and iframe, in visit.php hides all code that displays captcha, error icon, success icon, credits user's acccount...
This is the last part of visit.php that displays success icon after user clicked right captcha code:
// HOORAY! SUCCESS!
echo <<<EOT
document.getElementById('timer').setAttribute('class','success');
document.getElementById('timer').innerHTML='Success!';
EOT;
destroy();
?>
I tried to put this:
// HOORAY! SUCCESS!
echo <<<EOT
window.location= "<?php echo $ad_row['url']; ?>";
EOT;
destroy();
?>
because <?php echo $ad_row; ?>, displays the real link of sponsored ad (it's used for iframe) in view.php, but ofcorse it doesn't work....
there were these functions in view.php that I copied to visit.php but it didn't help:
$ad_id=limpiar($_GET["ad"]);
$ad_result=mysql_query("SELECT * FROM ads WHERE id='$ad_id'");
$ad_row=mysql_fetch_array($ad_result);
I don't know how to put another echo in echo :D :D
Can you plase solve these i tried googling for hours but no luck :(
Thank you a lot!