DEMO This free .tk domain is made available by a company called Dot TK and the free hosting is provided by AppFog. Create free hosting for site Go to AppFog Signup page Fill up the form and click Signup. Go to Create an app Choose an application: Choose a infrastructure and a subdomain (I use HP): After filling up form, click on Create App. You will be automatically redirected to the app panel.... [READ MORE]
Posts marked with "Posts" in posts
Get Google Profile Picture URL by email id using PHP
This is a trick using Google Profile. First of all we are going to set a variable with a Google E-mail address (Gmail address). We are going to set it with my E-mail address $email=’[email protected]’; Then we are going to split @ from the mail address. list($id, $domain) = split("@",$email); Next we are going to send a request to Google Profiles to fetch the IMAGE url. $headers = get_headers("https://profiles.google.com/s2/photos/profile/".$id, 1); The variable $id above is from the splitted part.... [READ MORE]
10 Songs for Making Programming Better
When I am coding my site Open or my blog, I hear a lot of songs along with coding. It makes me energetic and will help calm me down when an error occurs. The error probably will be a simple mistake but causes a lot of time to solve it. To calm me down I will play a song and BINGO ! I fixed the error. Here are the songs that make my coding easier and refreshes my mind.... [READ MORE]
How to edit/clear Ubuntu Terminal commands history ?
This simple trick will help you to clear or edit terminal commands you entered in Terminal of Ubuntu. Open the file /home/user/.bash_history (Replace red text with your username. To make it simple Go to your home folder and Press CTRL + H. It will show hidden files. search for the file .bash_history Edit the file. You can see all the commands you entered in Terminal. Remove what you don’t want and save.... [READ MORE]
How to replace protocol in links with the window URL protocol
The best way to this is by replacing every HTTP & HTTPS in the HTML file with //. For Example: Subins With : Subins If the location protocol is HTTPS all links’ protocol will be changed to HTTPS and If the location protocol is HTTP all links’ protocol will be changed to HTTP. For a mass replacement of links USE Regexxer.... [READ MORE]
New : Change background of Subins Network.
You can now change background of this blog and the whole Subins Network. You can only do this if you have a account in Subins. If you don’t have an account you can signup @ http://accounts-subins.hp.af.cm/signup.php. To change background you must go to My Account in Subins. In the left sidebar click Appearance. Click Themes or Background to change the background. Hope you like it. ... [READ MORE]
Using Regex to validate E-mail and Phone Number
Here is the RegEx expression to validate Phone number and E-mail. RegEx expression for validating E-mail : /^(([^<>()[].,;:s@"]+(.[^<>()[].,;:s@"]+)*)|(".+"))@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}])|(([a-zA-Z-0-9]+.)+[a-zA-Z]{2,}))$/ and the RegEx expression for validating Phone number : /^(?([0-9]{3}))?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/ Here is an example of usage of these RegEx expressions in JavaScript. var emailregex=/^(([^<>()[].,;:s@"]+(.[^<>()[].,;:s@"]+)*)|(".+"))@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}])|(([a-zA-Z-0-9]+.)+[a-zA-Z]{2,}))$/;var phoneregex=/^(?([0-9]{3}))?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/;if (emailregex.test(string)){// valid email}else{// Invalid email}if (phoneregex.test(string)){// valid phone number}else{// Invalid phone number} You can replace string with whatever you want. For Example: if (phoneregex.test($("#phone").val())){// valid phone number}else{// Invalid phone number} Enjoy !... [READ MORE]
My Short URL – a site for shortening URL’s
My Short URL is my latest invention. A site for shortening URL’s like goo.gl and bit.ly. <div> You can short URL’s on the site <a href="http://msurl.tk/" style="font-weight: bold;">MSURL.TK</a>. </div> <div> </div> As other projects the site is also hosted by AppFog and the free domain is given by My.Dot.TK. The project was created under 30 minutes and the lines of code is less that 64. It’s written in PHP as you already know it. The shortened URL only has 13 characters (without HTTP://).... [READ MORE]
Stop playback in HTML5 audio using Javascript
You may wanted to stop playback of an audio playing via audio HTML5 tag. Here is the code : document.getElementById(‘audio’).currentTime = 0;//By ID document.getElementsByTagName(‘audio’).currentTime = 0;//By Tag It’s that simple. Just use currentTime = 0.... [READ MORE]
Jquery ExtAjax Plugin V 1.2: Submit forms to external files with preview using Jquery
If you don’t know what this plugin will do then visit the page of the previous version here. The last version of Jquery ExtAjax plugin didn’t have preview feature. But in this version it have a preview feature. The latest version is V 1.2 What’s New in this version Faster Preview feature. What should I do after downloading. <div> <span style="color: #333333;"><span style="line-height: 16px;">After downloading upload "<b>extajax.js</b>", "<b>asdva.php</b>" to your server.... [READ MORE]