Just paste the given below file in a .htaccess file and put it in a web directory(generally root) and see the magic, dont forget to provide a log file at the end if you want to store all errors. php_value error_reporting 2047 php_flag display_errors false php_flag display_startup_errors false php_flag log_errors true php_value log_errors_max_len 100M php_flag [...]
Full Story »Block Hot linking
Hey Guys, If you want to prevent users from directly linking to images on your site that is called hot linking then you can use this code in .htaccess file to prevent this action. RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?site.com/.*$ [NC] RewriteRule \.(gif|jpg|png)$ – [F] it will deny the access to that image, [...]
Full Story »Select and unselect all checkbox using one master checkbox
<form method=”post” action=”something.php”> <input type=”checkbox” name=”mainbox” id=”mainbox” value=”” onclick=”checkstatus()”> <input type=”checkbox” name=”anyname1″ id=”anyname1″ value=”1″ > <input type=”checkbox” name=”anyname2″ id=”anyname1″ value=”2″ > <input type=”checkbox” name=”anyname3″ id=”anyname1″ value=”3″ > <input type=”checkbox” name=”anyname4″ id=”anyname1″ value=”4″ > <from> #################################################################### <script> function checkstatus() { if(document.getElementById(“mainbox”).checked==true) { alert(“checked”); checkbox = document.getElementsByTagName(‘input’); for (i = 0; i < checkbox.length; i++) { checkbox[i].checked [...]
Full Story »PHP 5 Paging Class
I have written a class and a example below the class to help you to use. <?php class paging { public $mysqli=NULL; public $result=NULL; public $totalrows=NULL; public $currentpage=1; public $limit=4; function __construct() { $this->mysqli= new mysqli (‘localhost’,’root’,”,’test’); } public function myresullt ($query) { $this->totalrows=$this->mysqli->query($query)->num_rows; $new_query=$query.’ limit ‘. (($this->currentpage*$this->limit)-$this->limit).’,’.$this->limit; $this->result=$this->mysqli->query($new_query); } public function myfetch () { [...]
Full Story »Search around a particular Latitude and longitude by a given radius
This post is related to search around a particular latitude and longitude for a given radius in Km or Miles. One degree of latitude is equal to about 69 or 70 miles or 111 Km. Suppose you have to search in a circle of 4 miles ,the center of the the circle is lat,long you [...]
Full Story »-
Enabling Browser Cache for your website
Some of us wants to enable cache for pages to improve performane so that if any user comes again on the site then static part of web should not load from server, it will really improves the performa -
Clearing Browser Cache
You may have trouble when you want a particular page to load every time from server and it is not doing so because of browser cache of a user browser. Lets take an example you have used captcha on -
Learn CSS
Today i realized that i should be good in CSS also instead of just writing code in server side languages. That’s y i created this post to make a centralized resource of all the css tutorials availab -
Search Bugs In Bugzilla Faster !!!
Hi, There is a way in bugzilla to search bugs faster without remembering Bug Id etc, It is just few steps away to search faster than before: Search for the text "Install the Quick -
Tabs in Putty
Everyone likes Putty and uses it. But the main thing everyone wants is tabs in Putty. This is v -
How to install Juniper Network Connect (VPN) on Ubuntu
You may be facing the same problem as i faced in connecting VPN through junipers network connect from Ubuntu platform. There are two reasons behind this : Java run time is not installed