sphinx Posted October 4, 2010 Share Posted October 4, 2010 <?php $link ='hits.php?on'; if (isset($_GET['on'])) header('Refresh: 3; url= ' . $link); ?> <title>Url - Statistics</title> <body bgcolor="#99E0FF"> <STYLE> <!-- a {text-decoration: none} //--> </STYLE> <div style="text-align: center;"><span style="font-family: Bookman Old Style; font-size: 10pt;"><span style="color: rgb(0, 0, 205);"><img border="0px" src="http://www.bertevers.nl/Statistics/pictures/statistics%20header.gif" title="" alt="" /></span></span><br /><br /> <span style="font-family: Bookman Old Style; font-size: 10pt;"><span style="color: rgb(0, 0, 205);">You've had</span> <span style="font-weight: bold; color: rgb(255, 69, 0);"><?php include "text_file_hit_counter.php"; ?></span> <span style="color: rgb(0, 0, 205);">Unique hits redirected to PrizeLive. </span></span><br><?php $link ='hits.php?on'; if (!isset($_GET['on'])) echo "<a href=\"?on\">" ?> <?php $link ='hits.php?on'; if (isset($_GET['on'])) echo "<a href=\"?off\">" ?> <span style="font-family: Arial; font-size: 8pt; color: rgb(255, 0, 0);"><?php $link ='hits.php?on'; if (isset($_GET['on'])) echo "(Click here to turn auto-refresh off)" ?> <?php $link ='hits.php?on'; if (!isset($_GET['on'])) echo "(Click here to turn auto-refresh on)" ?></span></a><br /><br /> <span style="font-family: Arial; font-size: 8pt; color: rgb(0, 0, 0);">Copyright Prizelive.net 2010 </span></span></span><span style="font-family: Arial; font-weight: bold; font-size: 8pt; color: rgb(0, 0, 0);">©</span><span style="font-family: Bookman Old Style; font-size: 10pt; color: rgb(255, 0, 0);"><span style="font-family: Arial; font-size: 8pt; color: rgb(0, 0, 0);"></span><br /> </span></div></div> <center><span style="font-family: Arial; font-size: 8pt; color: rgb(0, 0, 0);">Autofresh is: <?php $link ='hits.php?on'; if (isset($_GET['on'])) echo "Enabled |<a href=\"?off\"> Disable?</a>" ?> <?php $link ='hits.php?on'; if (!isset($_GET['on'])) echo "Disabled |<a href=\"?on\"> Enable?</a>" ?></span></span></span></center> <br><br> Result: http://www.prizelive.net/hits Is their a way of using less code? thanks Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted October 4, 2010 Share Posted October 4, 2010 there is almost always a way of using less code. here is one. this line is repeated several times for no apparent reason, as it the value is already set and is only used once at the top. $link ='hits.php?on'; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.