MP3 waveforms with PHP

If you are thinking how soundcloud.com generates the waveform for sound MP3 player? There are some audio processing libraries used to process MP3 files to WAV and then PNG / SVG images.. 1. LAME MP3 encoder/decoder $ lame input.mp3 -f -m m -b 16 –resample 8 resampled.mp3 && lame –decode resampled.mp3 output.wav 2. SOX – … Read more

Create Website Thumbnails using PhantomJS

Hope you read my old article “Create WebThumb using LAMP”, it used for creating web thumbnails from Xvfb virtual framebuffer that is more time and resource consuming. Shell Script with Xvfb try to open web browsers in real remote server to capture web-thumbs… That whole setup might take a full day and image quality is … Read more

SoundCloud Application

Connect the World of Sound * Share : http://developers.soundcloud.com/blog/sharing-sounds * Stream : http://developers.soundcloud.com/blog/stream-and-download * Customize : http://developers.soundcloud.com/blog/custom-players SoundCloud Widgets http://soundcloud.com/pages/widgets http://soundcloud.com/svnlabs API | Javascript SDK | Widget | Custom Player | oEmbed API Wrapper for SoundCloud written in PHP with support for authentication using OAuth 2.0 <?php try {     $response = json_decode($soundcloud->get(‘me’), true); } catch … Read more

Install Etherpad on SUSE Linux

Collaborate on documents in really real-time on SUSE Linux EtherPad is the first web-based word processor that allows people to work together in really real-time. All editing of the document is instantly visible on the screens of all participating users, enabling new and productive ways to collaborate on text documents. Etherpad is useful for meeting … Read more

AWS CloudFront with PHP

Amazon CloudFront is a web service for content delivery (CDN). It integrates with other Amazon Web Services EC2 / S3 to give developers and businesses an easy way to distribute content to end users with low latency and high data transfer speeds. http://aws.amazon.com/cloudfront/ Digital Inspiration – Thanks to http://www.labnol.org… it always provides help for all … Read more

The best way to consume API

    <?php require_once(‘lib/nusoap.php’); $url = “http://www.hotelscombined.com/api/wsdl/SearchSoap.wsdl”; // web service URL $client = new nusoap_client($url, false); // soap client to consume API // XML payload from “soapUI” to send over wsdl server $xmlRequest='<soapenv:Envelope xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:tem=”http://tempuri.org/” xmlns:hot=”http://schemas.datacontract.org/2004/07/HotelsCombined.WebServices.Version4″>    <soapenv:Header/>    <soapenv:Body>       <tem:HotelSearch>          <!–Optional:–>          <tem:request>             <hot:ApiKey>?</hot:ApiKey>             <hot:Checkin>?</hot:Checkin>             <hot:Checkout>?</hot:Checkout>             <hot:DisplayCurrency>?</hot:DisplayCurrency>             <hot:Guests>?</hot:Guests>             <hot:HotelID>?</hot:HotelID>             <hot:LanguageCode>?</hot:LanguageCode>             <hot:Rooms>?</hot:Rooms>             <hot:TimeOutInSeconds>?</hot:TimeOutInSeconds>             <hot:UserAgent>?</hot:UserAgent>             <hot:UserID>?</hot:UserID>             <hot:UserIPAddress>?</hot:UserIPAddress>          </tem:request>       </tem:HotelSearch> … Read more

Install geoip on xampp

Geocoding (finding latitude/longitude for street addresses), Geotagging (tagging media with latitude/longitude coordinates), and Geolocation (finding latitude/longitude of computer with IP X-Forwarded-For). There are some options to install on linux environment: # wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz # gunzip GeoLiteCity.dat.gz # sudo mkdir -v /usr/share/GeoIP # sudo mv -v GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat Install geoip with php5 # sudo apt-get install … Read more

Download youtube videos using PEAR

PEAR have rich library to access web based resources easily… <?php $sv = new SVTube(); $sv->download(“D7cm-yu-CP0”, “svnlabs.flv”) ?> Class: SVTube.php —————————— <?php require_once ‘HTTP/Client.php’; require_once ‘HTTP/Request.php’; class SVTube { var $req; var $debug = false; var $auth = false; function download ($video_id, $video_filename) { $url = “https://www.youtube.com/watch?v=”.$video_id; $this->req =& new HTTP_Request($url); $response = $this->req->sendRequest(); if … Read more