Custom domain redirect from non-www to www in blogger

This tutorial will help to fix blogger custom domain redirect without www to www, for example redirecting xyz.com (Naked Domain) to www.xyz.com. Blogger has already option of non www to www redirect but sometimes it not work due to the incomplete DNS settings. In order to solve this problem we have to add missing A records […]

Read More

Make A Blank Template / HTML Page In Blogger

Blogger Templates can be very messed up with lots and lots of code. If you are trying to create a Blogger Template from scratch, the first thing you need is a blank HTML page. That’s exactly what we are going to do today. DEMO Blogger Simple Template To Blank Page Criterias Blogger won’t allow you […]

Read More

How to rename uploaded file before saving it into a directory?

Use this code to rename the file automatically :- Instead of move_uploaded_file($_FILES[“file”][“tmp_name”], “../img/imageDirectory/” . $_FILES[“file”][“name”]); Use $temp = explode(“.”, $_FILES[“file”][“name”]);$newfilename = round(microtime(true)) . ‘.’ . end($temp);move_uploaded_file($_FILES[“file”][“tmp_name”], “../img/imageDirectory/” . $newfilename); Changed to reflect your question, will product a random number based on the current time and append the extension from the originally uploaded file.

Read More

Converting timestamp to time ago in PHP e.g 1 day ago, 2 days ago…

converting  a timestamp of the format 2009-09-12 20:57:19 and turn it into something like 3 minutes ago with PHP. Use example : echo time_elapsed_string(‘2016-05-01 00:22:35’);echo time_elapsed_string(‘@1367367755’); # timestamp inputecho time_elapsed_string(‘2016-05-01 00:22:35’, true); Input can be any supported date and time format. Output : 4 months ago4 months, 2 weeks, 3 days, 1 hour, 49 minutes, 15 seconds ago Function : […]

Read More

How to store array in mysql?

This is one of the most asked question by php programmer because mysql doesn’t has any array data type. So we can not store array directly into mysql database. To do this we have to first convert array into string using php serialize() function then save it into mysql database. php code to store array […]

Read More

How to Find the Wi-Fi Password of your Current Network

Your computer is connected to a Wi-Fi network but you do not remember the password that you had earlier used to connect to this particular WiFi network. Maybe you forgot the password or maybe the network administrator entered it directly without revealing the actual password to you. You would now like to connect a second […]

Read More

URL redirect through .htaccess file

URL rewrite helps you to hide your extension name or show different extension name like index.php can be displayed as index.html or only index or home etc.The following code will rewrite anyfile.php to anyfile.html RewriteEngine on RewriteRule ^(.*).html$ $1.php The following code will rewrite index.php to index RewriteEngine on RewriteRule ^index index.php   Few Example […]

Read More

Redirecting Sub directory to Sub-Domain

Redirect www.example.com/blog to blog.example.com A lot of web hosts today provide an easy implemention for subdomain creation in their administration panels. You just need to to go there, choose you subdomain name, and then point it to a directory in your tree. If you can’t, then it will be a little more complicated (You will […]

Read More