Best API for Geolocating an IP Address

GeoIP Location tracking help website owner to serve users better way. GeoIP helps to locate and identify website visitor’s Location by IP address. There are many GeoIP Location API in market which have global IP database services worldwide, but they have some limitations on number of API call per website or user. IP Geolocation API … Read more

Convert AWS DynamoDB Table JSON to Simple PHP Array or JSON

Amazon DynamoDB support these datatype for data – String – Binary – Number – StringSet – NumberSet – BinarySet – Map – List – Boolean – Null AWS provides command line tool to SCAN DynamoDB Tables and export as JSON file # /usr/local/bin/aws dynamodb scan –table-name Users –query ‘Items[*]’ –region us-east-1 –output json Amazon DynamoDB … Read more

Amazon DynamoDB Formatted JSON using JQ

Linux sed is useful tool to format and transform plain text. But sed is not so useful for structured data like JSON. JQ is a sed-like tool easily deal with JSON. ./jq is a lightweight and flexible command-line JSON processor. Install jq on OS X: brew install jq Install jq on Ubuntu: apt-get install jq … Read more

How to add MP3 audio delayed in MP4 video?

FFMPEG Command: Add MP3 Audio file delayed in MP4 video file # ffmpeg.exe -i “fox-story.mp4” -itsoffset 5.00 -i “fox-story.mp3” -map 0:v -map 1:a -vcodec copy -acodec copy “The Fox and Crow Story.mp4” Input: fox-story.mp4 and fox-story.mp3 Output: The Fox and Crow Story.mp4 -itsoffset 5.00 -i “movie.mp3” Offsets timestamps of audio streams by 5.00 seconds -map … Read more

Song Lyrics: lrc2srt and srt2json

LRC2SRT.php <?php function lrc2srt( $lrc ) { $lrc = explode( “\n”, $lrc ); $srt = “”; $lines = array(); foreach ( $lrc as $lrcl ) { if ( preg_match( “|\[(\d\d)\:(\d\d)\.(\d\d)\](.+)|”, $lrcl, $m ) ) { $lines[] = array( ‘time’ => “00:{$m[1]}:{$m[2]},{$m[3]}0”, // convert to SubRip-style time ‘lyrics’ => trim( $m[4] ) ); } } for … Read more

MistServer PHP API for Live Stream

MistServer is a highly versatile, lightweight, customizable open-source multi-standard multimedia server. MistServer configuration is easy to use for full CDN solutions applications. Hope you already read our article to Install MistServer MistServer API provides a Server API and a Management API. You can find MistServer PHP API Examples Here Note: Make sure port 4242 used … Read more

JSON2CSV – convert json files to csv

JSON2CSV is a python script that converts json data to a csv file. json2csv.py_.txt Download above text file “json2csv.py_.txt” then rename “json2csv.py” >> python json2csv.py “input.json” “output.csv” JSON – input.json [ { “createdAt”: “2014-02-20T18:15:56.818Z”, “fbID”: “34534534534”, “lessonQuestions”: 5, “lessonScore”: 2750, “lesson_no”: 2, “objectId”: “htmsuPr6F6”, “updatedAt”: “2014-02-22T15:42:38.166Z” }, { “createdAt”: “2014-02-21T16:45:52.550Z”, “fbID”: “100001132788807”, “lessonQuestions”: 5, “lessonScore”: … Read more

Facebook Adding an App to a Page

You can provide App to Fan Page Tab using URL, but you must check below options to get App (Page Tab) Added Page ID? https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&next=YOUR_URL After successful authorization users will redirect to your Site URL with pageID http://www.domain.com/?tabs_added[pageID]=1#_=_ Integrating with Facebook APIs When a user selects Page Tab and authorize your application, you receive the … Read more