by Shashi Dhar Kumar | Feb 10, 2012 | PHP, Programming, Unix OS
How to redirect web based page with .htaccess Following are the code to paste (be careful to write on .htaccess it can be messed up whole website if anything goes wrong) into .htaccess file 301 redirection for any domain : RewriteEngine On RewriteCond %{HTTP_HOST}...
by Shashi Dhar Kumar | Mar 7, 2011 | Open-Source, PHP, Programming
How to change the XAMPP server port number Why do we need to change the port number? It is very common that a web developer needs to have multiple web servers running, all at the same time. For example, an XAMPP server can be used to run the local wordpress, while a...
by Shashi Dhar Kumar | Mar 2, 2011 | Open-Source, PHP, Programming, SQL Server
How to create new user in PhpMyAdmin at localhost? Go to phpmyadmin at your localhost if you are using xampp server than go with http://localhost/phpmyadmin or if you are using easyphp than go with http://127.0.0.1/phpmyadmin Now you can see different links related to...
by Shashi Dhar Kumar | Feb 18, 2011 | Open-Source, PHP, Programming
Get the First Monday of the current Month or Get Last Day of Month or Get First Day of Month Get the First Monday of the current Month <?php function getFirstMonday($month,$year) { $num = date(“w”,mktime(0,0,0,$month,1,$year)); if($num==1) return...
by Shashi Dhar Kumar | Feb 16, 2011 | Open-Source, PHP, Programming
Get a File name from url Using PHP Get the “filename”, or the last part of the string, with the basename function. <?php $url = ‘http://www.example.com/feeds/xyz/index.php?filename=abc’; echo basename($url); // print “index.php”; ?>...
by Shashi Dhar Kumar | Jan 29, 2011 | PHP, Unix OS
How to increase my website speed through .htaccess in LAMP Technology Many LAMP(Linux Apache MySQL PHP) driven websites today could easily decrease their bandwidth output and increase their speed through implementing caching and compressing their content. Even with...