Tuesday, 25 November 2014

decode special character in php

many times html was unable to render properly. So we use

ex.   Which company in india

if we use htmlspecialchars_decode() then result

    Which company in india


Thursday, 20 November 2014

How to store audio file in browser local storage


Using below code we can store audio file in browser local storage

1. Create XHR and FileReader objects

var xhr = new XMLHttpRequest(),
fileReader = new FileReader();
xhr.open("GET", url_audio, true);


2. Set responseType to blob

xhr.responseType = "blob";


3. add addEventListener

xhr.addEventListener("load", function () 
{
if (xhr.status === 200)
{
fileReader.onload = function (evt) 
{
// Read out file contents as a Data URL
var result = evt.target.result;
var audioElement = document.createElement('audio');
audioElement.setAttribute('src',result);
audioElement.setAttribute('autoplay', 'autoplay');
try 
{
localStorage.setItem(key, result);
}
catch (e) 
{
console.log("Storage failed: " + e);
}
};
// Load blob as Data URL
fileReader.readAsDataURL(xhr.response);
}
}, false);
xhr.send();

Monday, 14 April 2014

How to trasnsfer blogger from one gmail account to another

steps to transfer
1. first go to setting from blogger account
2. add another user and send invitation
3. login by gmail where you send invitation
4. accept invitation
5. login again original blogger account and go to settings
6. now you can see two account
7. make admin to another account and remove blogger original gmail



you have successfully transferred ..............................enjoy