PDA

View Full Version : PHP Torch



Eric30
23-08-2006, 10:59 PM
I got bored, and made a PHP Torch:


<div align="center"><?php
if(isset($_GET['on'])){
echo '<body bgcolor="#FFFF00" text="#000000" link="#000000" vlink="#000000" alink="#000000">
<a href="?off">Turn Torch Off</a>
<br><br>
<a href="javascript:window.close();">Close Torch</a>';
}elseif(isset($_GET['off'])){
echo '<body bgcolor="#000000" text="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF">
<a href="?on">Turn Torch On</a>
<br><br>
<a href="javascript:window.close();">Close Torch</a>';
}else{
?>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function fullScreen(theURL) {
window.open(theURL, '', 'fullscreen=yes, scrollbars=auto');
}
// End -->
</script>
<a href="javascript:void(0);" onClick="fullScreen('torch.php?off');">Open
Torch</a>
<?php

}
?>
</div>

Steven.
23-08-2006, 11:02 PM
;O cool!

be better if it was an image of a torch with a button that you can turn it on / off. ^_^

demo: http://stevena.co.uk/torch.php :)

Eric30
23-08-2006, 11:04 PM
Hehe, thanks for the demo, it was only like a 5 min job.

If i get really really bored i might make a torch image lol

Mentor
24-08-2006, 01:40 AM
o.0 urmmm is it just me or is that both entirly pointless and wasteful?
u could achive the same thing in about 3 lines of javascript? which would requre any server side proccesing or anything as well as being fast o.0

Eric30
24-08-2006, 05:44 PM
o.0 urmmm is it just me or is that both entirly pointless and wasteful?
u could achive the same thing in about 3 lines of javascript? which would requre any server side proccesing or anything as well as being fast o.0

It is indeed pointless and wasteful :D

DMB-Hosting
24-08-2006, 07:46 PM
It wasnt a torch lmao it was just background changing colors

Want to hide these adverts? Register an account for free!