| | |
Help with gateway script!
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Hi,
I have a site with free games, etc..
I want to do this: when a user clicks on a game to play, he is redirected to the landing page, where a script checks, if he has our toolbar installed; if yes, then he can play the game - if not, the background freezes and in the front shows a prompt window (mgate.php), to install the toolbar.
I have developed a code, but it does not work properly, so I am asking for a little help
Here is the code for the page with game on it (example: index.php):
And here is the code for the landing page:
Help pls!
I have a site with free games, etc..
I want to do this: when a user clicks on a game to play, he is redirected to the landing page, where a script checks, if he has our toolbar installed; if yes, then he can play the game - if not, the background freezes and in the front shows a prompt window (mgate.php), to install the toolbar.
I have developed a code, but it does not work properly, so I am asking for a little help
Here is the code for the page with game on it (example: index.php):
PHP Syntax (Toggle Plain Text)
<html> <head> <script type="text/javascript"> toolbar=0; function ToolBarInit(tool) { toolbar=1; } function checkToolbar(){ if(toolbar!=1) { window.location.href="landingpage.php"; } } </script> <script language="javascript"> document.getElementById('mask').style.visibility='visible' document.getElementById('mask2').style.visibility='visible' document.getElementById('mask').style.height=document.body.clientHeight function loadContent(){ if(toolbar==1){ document.getElementById('cont').innerHTML='<div width=500 height=500 style="overflow: hidden;" id=media_container><embed src= "http://www.odeo.com/flash/audio_player_standard_gray.swf" quality="high" width="300" height="52" allowScriptAccess="always" wmode="transparent" type="application/x-shockwave-flash" flashvars= "valid_sample_rate=true&external_url=<?=$_GET[url];?>" pluginspage="http://www.macromedia.com/go/getflashplayer"> </embed></div>' document.getElementById('mask').style.visibility='hidden' document.getElementById('mask2').style.visibility='hidden' } } function confirmDL(){ location.href='http://mydomain/toolbar.exe'; } </script> </head> <body> <h1><a href="http://mydomain/game.swf">Click to Play!</a></h1> </body> </html>
And here is the code for the landing page:
PHP Syntax (Toggle Plain Text)
<html> <head> </head> <body onLoad="loadContent();" style="position:relative; display:block"> <div id=mask style="width:100%; height:100%; position:absolute; z-index:1000; background-color: black; filter:alpha(opacity=50);-moz-opacity:.50;opacity:.50;left:0px; top:0px; display:block; visibility:hidden" align=center></div> <div id=mask2 style=" position: absolute; width: 650px; z-index:1500; display:block; margin-left:50%; visibility:hidden" ><div style='position:absolute; z-index:1500; width:650px; height:450px; background-color:white; border:1px solid gray; margin-left:-325px; display:block; margin-top:200px; ' align=center><?php include_once("mgate.php");?></div></div> <script language="javascript"> document.getElementById('mask').style.visibility='visible' document.getElementById('mask2').style.visibility='visible' document.getElementById('mask').style.height=document.body.clientHeight function loadContent(){ if(toolbar==1){ document.getElementById('cont').innerHTML='<div width=500 height=500 style="overflow: hidden;" id=media_container><embed src= "http://www.odeo.com/flash/audio_player_standard_gray.swf" quality="high" width="300" height="52" allowScriptAccess="always" wmode="transparent" type="application/x-shockwave-flash" flashvars= "valid_sample_rate=true&external_url=<?=$_GET[url];?>" pluginspage="http://www.macromedia.com/go/getflashplayer"> </embed></div>' document.getElementById('mask').style.visibility='hidden' document.getElementById('mask2').style.visibility='hidden' } } function confirmDL(){ location.href='http://mydomain/toolbar.exe'; } </script> <div id=('cont') </body> </html>
If you think you are the smartest, you definetly are not. But you can strive to be one. Cashwizz Affiliate network
![]() |
Similar Threads
- Shell Script (Shell Scripting)
- shell script to generate pdf (Shell Scripting)
- capturing line from script output and appending to a file (Shell Scripting)
- VB Script Format (Visual Basic 4 / 5 / 6)
- A question on java script?(Please answer ASAP) (Java)
Other Threads in the PHP Forum
- Previous Thread: Email FUnction with PHP & PDF pr Word FOrmat
- Next Thread: Any suggestion about schedule graphic
| Thread Tools | Search this Thread |
.htaccess alerts apache api archive array autocomplete beginner binary broken cakephp checkbox class cms code convert cron curl database date display duplicates dynamic echo email emptydisplayvalue error errors explodefunction file files folder form forms function functions google hack href htaccess html htmlspecialchars image include insert ip javasciptvalidation javascript joomla keywords limit link login loop mail menu methods mlm multiple mysql network object oop paypal pdf php problem query radio random recursion recursive redirect regex remote script search securephp server sessions shot sms soap source space sql subscription syntax system table tutorial update upload url validator variable video web xml youtube





