Wednesday, December 29, 2010

CSS Browsers Detection

 Internet Explorer 6

<!--[if lte IE 6]>
    <link type="text/css" rel="stylesheet" href="/css/ie6.css" />
<![endif]-->

For Internet Explorer 6 or less than

<!--[if lte IE 6]>
    <p class="massiveLetters">You are using Internet Explorer 6, for the love of God please upgrade!!</p>

    <script type="text/javascript">
        alert('Stop Using IE6 now!!');
    </script>
<![endif]-->

For non Internet Explorer

<!--[if !IE 6]>
    <link type="text/css" rel="stylesheet" href="/css/ie6.css" />
<![endif]-->

Tuesday, December 28, 2010

PHP Url Parameter Encryption - using base64_encode

Encodes the given data with base64.
<code>
<?php
$str = 'instructions';
echo base64_encode($str);
?>
</code>
the out put
aW5zdHJ1Y3Rpb25z
here i want to encript this url
http://mathu.co.cc/index.php?view=instruction

the coding like this
http://mathu.co.cc/index.php?view=<?php echo base64_encode('instructions'); ?>

the out put url like this
http://mathu.co.cc/index.php?view=aW5zdHJ1Y3Rpb25z

and  also you use 'base64_decode' to decrypt the url parameter
<code>
<?php
$str = 'aW5zdHJ1Y3Rpb25z';
echo base64_encode($str);
?>
</code>

Saturday, December 4, 2010

hi