While working with one of our client at rtCamp who was using REST API for thier website with PWA theme, We found out that it was taking way too much time at user endpoint
Continue reading Optimizing default WordPress REST API user endpoint for redundant DB calls made for permissions check.
Hey there, As you know VIP Quickstart has been deprecated recently. Here is some easy way to get started with VIP development, We hope soon EasyEngine will V4 launch with VIP support but for now, lets do all thing manually.
You need Ubuntu 14 / 16 LTS with sudo access also we need svn and git installed.
Continue reading Setting up WordPress.com VIP Development Environment with EasyEngine (Nginx)
One of our client has asked for road map feature for their website. basically what he need is A Road map which list all places around the route.
Now getting distance between to points was very easy the important thing is how to draw polygon around route.
After lot of browsing and googling I found amazing library which is able to draw polygon around route it’s called JSTS library.
Continue reading Google Maps API drawing polygon with JSTS Librery
// Convert Words (text) to Speech (MP3)
// Google Translate API cannot handle strings > 100 characters
$word = substr($word, 0, 100);
// Replace the non-alphanumeric characters
// The spaces in the sentence are replaced with the Plus symbol
$word = urlencode($word);
// If the MP3 file exists, do not create a new request
// create curl resource
$ch = curl_init();
// set url
curl_setopt($ch, CURLOPT_URL, 'http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q='.$word);
//return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// $output contains the mp3 file
$mp3 = curl_exec($ch);
// close curl resource to free up system resources
PS: this code no longer works as google added captcha code