| | |
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 |
apache api array beginner binary broken cache cakephp checkbox class cms code confirm cron curl customizableitems database date display dynamic echo email error external fcc file files folder form forms forum freelancing function functions google header headmethod howtowriteathesis href htaccess html iframe image include insert ip javascript joomla limit link login mail malfunction menu method mlm mod_rewrite multiple mysql neutrality oop pageing pagerank paypal pdf php phpmysql play problem query question radio random recursion remote root script search select server sessions sms soap source space sql support! syntax system table template tutorial update upload url validator variable video web youtube





