<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-7339286656747792301</atom:id><lastBuildDate>Sun, 12 May 2013 01:20:57 +0000</lastBuildDate><category>google+</category><category>facebook_graph_api</category><category>web-scrapping</category><category>html5</category><category>SSEs</category><category>Sms</category><category>api</category><category>Gtalk</category><category>Tutorials</category><category>chrome</category><category>ifttt</category><category>Flash</category><category>Games</category><category>Minimalism</category><category>css</category><category>nokia</category><category>wrt</category><category>plugin</category><category>DnD</category><category>amazon</category><category>resource</category><category>nodejs</category><category>video</category><category>mobile-dev</category><category>.htaccess</category><category>Web-service</category><category>Eco</category><category>aws</category><category>Animation</category><category>Application</category><category>xml</category><category>idea</category><category>Internet</category><category>research</category><category>tool</category><category>Javascript</category><category>php</category><category>codeplayers</category><category>links</category><category>Yql</category><category>Canvas</category><category>jquery</category><category>android</category><category>Tip</category><category>guest_post</category><category>hacks</category><category>twitter</category><category>Sound</category><category>joke</category><category>stats</category><category>mp3</category><category>MySql</category><category>fun</category><category>json</category><category>money</category><title>Motyar's Blog</title><description /><link>http://motyar.blogspot.com/</link><managingEditor>noreply@blogger.com (Motyar D)</managingEditor><generator>Blogger</generator><openSearch:totalResults>133</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/motyarblogspot" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="motyarblogspot" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">motyarblogspot</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-1714822844796049743</guid><pubDate>Sun, 12 May 2013 01:20:00 +0000</pubDate><atom:updated>2013-05-12T06:50:57.072+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tip</category><category domain="http://www.blogger.com/atom/ns#">idea</category><title>A Note to Myself</title><description>I wrote this a few weeks ago and I keep it open on my desktop at all times.&lt;br /&gt;
---&lt;br /&gt;
That would be great. But you know what else would be? Actually finishing an idea that you have started. How many times do you start to work on something and never finish it?&lt;br /&gt;
EVERY time.&lt;br /&gt;
You've been doing this your whole life. Somehow along the way you have learned many things and even became a master in a few different areas. But that is not what you want.&lt;br /&gt;
You want to create.&lt;br /&gt;
It's not really creating when you never finish.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://news.ycombinator.com/item?id=5691216" target="_blank"&gt;via&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2013/05/a-noteto-myself.html</link><author>noreply@blogger.com (Motyar D)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-7509799471656537235</guid><pubDate>Sat, 20 Apr 2013 11:37:00 +0000</pubDate><atom:updated>2013-04-20T17:07:01.725+05:30</atom:updated><title>Instagram for pc</title><description>Is there any service same like Instagram I can use on PC. Let me know, reply&amp;nbsp;@motyar&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2013/04/instagram-for-pc.html</link><author>noreply@blogger.com (Motyar D)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-2880351795389387255</guid><pubDate>Sun, 10 Mar 2013 17:45:00 +0000</pubDate><atom:updated>2013-03-10T23:15:32.609+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tutorials</category><category domain="http://www.blogger.com/atom/ns#">php</category><title>Parsing JSON API response with php</title><description>PHP has a powerful JSON parsing system, you can encode JSON string to Object using json_decode and by using &lt;a href="http://motyar.blogspot.in/2012/07/php-object-to-array.html" target="_blank"&gt;Php Object to Array&lt;/a&gt;, object can be converted to array.

Lets break this in few steps.

&lt;br /&gt;
&lt;h3&gt;
1. Fetching the response from API&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
$response  = file_get_contents($requestUrl);
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;h3&gt;
2. Decoding the JSON data to Object&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
$jsonobj  = json_decode($response);
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;h3&gt;
4. Converting object to array.&lt;/h3&gt;
You can use Php Object to Array function to convert object to array.
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
$resultArray = object2array($jsonobj);
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;h3&gt;
Final code&lt;/h3&gt;
You can use &lt;a href="http://motyar.blogspot.in/2012/07/php-object-to-array.html" target="_blank"&gt;Php Object to Array function&lt;/a&gt; to convert object to array.
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
$requestUrl = 'https://graph.facebook.com/motyar';
$response  = file_get_contents($requestUrl);
$jsonobj  = json_decode($response);
$resultArray = object2array($jsonobj);
print_r($resultArray);
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2013/03/parsing-json-api-response-with-php.html</link><author>noreply@blogger.com (Motyar D)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-2443147627062718008</guid><pubDate>Thu, 28 Feb 2013 16:26:00 +0000</pubDate><atom:updated>2013-02-28T21:59:07.224+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tip</category><category domain="http://www.blogger.com/atom/ns#">hacks</category><title>Hacking Micromax 400R (Mi-Fi)</title><description>Hacking means making things usable. For me most of the times its possible by creating stuff but sometimes have to break stuff.
Today I hacked at a software just to get the functionality out as needed.&lt;br /&gt;
Let me tell you the story in breaf -&lt;br /&gt;
&lt;br /&gt;
Yesterday I bought a &lt;a href="http://www.micromaxinfo.com/datacard-display.aspx?datacardcategory=router&amp;amp;datacardid=mmx%20400r" target="_blank"&gt;Micromax 400R (Mi-Fi)&lt;/a&gt;, Its a great device and cheap too ( Got just for 2450INR ). The MMX 400R is wireless router and Wi – Fi hotspot. Can be used to share 2G-3G dataplan over Wi-Fi for max 5 devices.&lt;br /&gt;
&lt;br /&gt;
It was working well at start, but it started showing annoying ads when opening new web pages. For example if I am opening google.com, It redirects to&amp;nbsp;192.168.1.1/ads.html?url=http://google.com and ask you to "Enter M! APPs" or "Do not show this page".&amp;nbsp;Every-time&amp;nbsp;Have to click "Do not show this page".

&lt;br /&gt;
Was something like this:-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-ZCKr-M3EJ3o/US98l51jAUI/AAAAAAAACsI/ywBKWBG50-M/s1600/Captures.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="297" src="http://4.bp.blogspot.com/-ZCKr-M3EJ3o/US98l51jAUI/AAAAAAAACsI/ywBKWBG50-M/s400/Captures.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I was exploring things, all the settings but found nothing to disable this ad.

MMX 400R have a feature of "SD Card Sharing", Card can be accessed in browser by opening http://192.168.1.1 and choosing "Advance settings"-"Sharing"-"Sharing"
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-Tl9R8q117BU/US9_xXu5FGI/AAAAAAAACsQ/nFIazjT1Bjg/s1600/Capture2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="305" src="http://3.bp.blogspot.com/-Tl9R8q117BU/US9_xXu5FGI/AAAAAAAACsQ/nFIazjT1Bjg/s400/Capture2.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Buy exploring all the Ajax-calls I found that I can&lt;br /&gt;
&lt;br /&gt;
1. View file list of a location using this call -&amp;nbsp;
&lt;br /&gt;
http://192.168.1.1/cgi-bin/ajax.cgi?which_cgi=ajax_get_file_list&amp;amp;pram=DIR_PATH

2. Can download file using this call - 
http://192.168.1.1/cgi-bin/export_file.cgi?get_file_path=DIR_PATH/FILE_NAME&amp;amp;get_file_name=FILE_NAME&lt;br /&gt;
&lt;br /&gt;
2. Can create folder by using this call&lt;br /&gt;
&lt;br /&gt;
http://192.168.1.1/cgi-bin/ajax.cgi?which_cgi=ajax_creat_folder&amp;amp;creat_current_folder_dir=DIR_PATH&amp;amp;lc_folder_name=FOLDER_NAME&amp;nbsp;
&lt;br /&gt;
&lt;br /&gt;
3. Delete file or folder by using&lt;br /&gt;
http://192.168.1.1/cgi-bin/ajax.cgi?which_cgi=ajax_delete_file&amp;amp;file_op_name=DIR_OR_FILE_PATH&lt;br /&gt;
&lt;br /&gt;
4. Upload or overwrite file, sending POST [multipart/form-data] request using these parameters
current_folder_dir( value should be "longcheer_w&amp;gt;DIR_PATH&amp;gt;")
lc_upfile ( type="file" File)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;I tried and found that by using  DIR_PATH as "/../../../mnt/resource/webpage" you can view, download or edit [ By uploading/overwriting ] all the scripts, files working at http://192.168.1.1/&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I downloaded ads.html, as Its simple HTML/JS file, edited it so it can automatic redirect to the url without clicking on "Do not show this page".&amp;nbsp;
&lt;br /&gt;
&lt;br /&gt;
Try editing the cgi-scripts on your own risk.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Happy Hacking.


&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2013/02/hacking-micromax-400r-mi-fi.html</link><author>noreply@blogger.com (Motyar D)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-ZCKr-M3EJ3o/US98l51jAUI/AAAAAAAACsI/ywBKWBG50-M/s72-c/Captures.PNG" height="72" width="72" /></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-7798582244351476744</guid><pubDate>Sun, 10 Feb 2013 12:07:00 +0000</pubDate><atom:updated>2013-02-21T12:36:50.777+05:30</atom:updated><title>Buy this Responsive Blogger Template</title><description>This site uses a Responsive Blogger Template developed specially for this blog. After various request from friends and colleagues I decided to sell it online.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
The template have &lt;b&gt;responsive layout&lt;/b&gt;. Work and look beautiful in almost any resolution device.&lt;br /&gt;
&lt;br /&gt;
I decided to charge $12 per installation. [ This includes all future updates &lt;span style="color: orange;"&gt;#FREE&lt;/span&gt;].&lt;br /&gt;
&lt;br /&gt;
After the checkout process I will manually (24 hrs maximum) send you a template file of the theme.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;All sales are final— no refunds.

Life-time updates for 1 domain: $12 USD


&lt;br /&gt;
&lt;br /&gt;
&lt;form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="_xclick"&gt;
&lt;input name="cmd" type="hidden" value="_xclick" /&gt;
&lt;input name="business" type="hidden" value="dharmmotyar@gmail.com" /&gt;
&lt;input name="image_url" type="hidden" value="" /&gt;
&lt;input name="cpp_header_image" type="hidden" value="" /&gt;
&lt;input name="currency_code" type="hidden" value="USD" /&gt;
&lt;input name="item_name" type="hidden" value="Motyar Blogger Template" /&gt;
&lt;input name="amount" type="hidden" value="12.00" /&gt;
&lt;input type="submit" value="Buy now" /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/form&gt;
&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2013/02/buy-this-responsive-blogger-template.html</link><author>noreply@blogger.com (Motyar D)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-8695872239326739666</guid><pubDate>Fri, 08 Feb 2013 13:14:00 +0000</pubDate><atom:updated>2013-02-08T18:46:38.271+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">hacks</category><category domain="http://www.blogger.com/atom/ns#">ifttt</category><category domain="http://www.blogger.com/atom/ns#">web-scrapping</category><category domain="http://www.blogger.com/atom/ns#">php</category><title>Hacking IFTTT</title><description>I hope you all know about &lt;a href="https://ifttt.com/wtf" target="_blank"&gt;IFTTT&lt;/a&gt; (if this, then that), Using IFTTT you can automate few Actions when Triggers fire on &lt;a href="https://ifttt.com/channels" target="_blank"&gt;Channels&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
But everything have its limits so IFTTT has them too, In this post I will try to explain how I tried to expand its limits.&lt;br /&gt;
&lt;br /&gt;
Here is on example Recipes.

&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://ifttt.com/recipes/78175" target="_blank"&gt;If I like an image post on Tumblr, put image in Dropbox&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-9w8WuRyeKvs/URT2zYktvpI/AAAAAAAACrY/Pt9TXSGZT0s/s1600/Capture.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-9w8WuRyeKvs/URT2zYktvpI/AAAAAAAACrY/Pt9TXSGZT0s/s1600/Capture.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
What the hack here&lt;/h3&gt;
The problem with "&lt;a href="https://ifttt.com/channels/tumblr/triggers/35" target="_blank"&gt;New like on tumblr&lt;/a&gt;" doesnt provide image url, but it provides the "Post URL".
I am using &lt;a href="http://motyar.blogspot.com/ncr/2012/09/get-image-link-of-tumblr-post.html" target="_blank"&gt;this script&lt;/a&gt; to get "Image url" using "Post url" and script (tumb.php) redirects to the image link.&lt;br /&gt;
Using "http://motyar.info/tumb.php?u={{Url}}" as file url.
&lt;br /&gt;
&lt;h3&gt;
Code&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
function getImg($postUrl){
 $url = explode("/", $postUrl);
 $data = file_get_contents("htt"."p://".$url[2]."/mobile/post/".$url[4]);
 preg_match_all('',$data,$matches,PREG_PATTERN_ORDER);
 return $matches[1][0];
}
$imgUrl = getImg($_GET['u']);
header("Location:".$imgUrl);
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-jR8WHwq2n-0/URT2-I7a7qI/AAAAAAAACrg/scmDUR56YBA/s1600/Captursse.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-jR8WHwq2n-0/URT2-I7a7qI/AAAAAAAACrg/scmDUR56YBA/s1600/Captursse.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
What is possible?&lt;/h3&gt;
There are a lot of possibilities, You just have to process the available input to generate the required output.&lt;br /&gt;
&lt;br /&gt;
Happy hacking. &lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2013/02/hacking-ifttt.html</link><author>noreply@blogger.com (Motyar D)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-9w8WuRyeKvs/URT2zYktvpI/AAAAAAAACrY/Pt9TXSGZT0s/s72-c/Capture.PNG" height="72" width="72" /></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-1796057462134973404</guid><pubDate>Sun, 06 Jan 2013 08:10:00 +0000</pubDate><atom:updated>2013-01-06T13:40:51.719+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">jquery</category><category domain="http://www.blogger.com/atom/ns#">joke</category><title>-1 not enough jQuery.</title><description>I found it so funny, Read it, what you think?&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-Hk1mt-RKYLc/UOkxShm6NrI/AAAAAAAACqo/LVmqHOfWV7g/s1600/20091116-so-large.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="546" src="http://4.bp.blogspot.com/-Hk1mt-RKYLc/UOkxShm6NrI/AAAAAAAACqo/LVmqHOfWV7g/s640/20091116-so-large.gif" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a href="http://therockncoder.blogspot.in/2012/11/not-enough-jquery.html" target="_blank"&gt;via this&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2013/01/1-not-enough-jquery.html</link><author>noreply@blogger.com (Motyar D)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-Hk1mt-RKYLc/UOkxShm6NrI/AAAAAAAACqo/LVmqHOfWV7g/s72-c/20091116-so-large.gif" height="72" width="72" /></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-2953360628530843395</guid><pubDate>Tue, 18 Dec 2012 06:39:00 +0000</pubDate><atom:updated>2012-12-18T12:22:07.420+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">api</category><category domain="http://www.blogger.com/atom/ns#">amazon</category><category domain="http://www.blogger.com/atom/ns#">web-scrapping</category><category domain="http://www.blogger.com/atom/ns#">Web-service</category><title>Amazon Offers Price Tracking using WebScrapeMaster</title><description>Was trying to get a list of offers (their prices) for an item based on the ASIN. Exploring all the APIs but find nothing that can solve my problem. So scraping web is the last choice.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Which page to scrape&lt;/h3&gt;
This page displays the information I was looking for.&lt;a href="http://www.amazon.com/gp/offer-listing/B0002F7MX6/ref=dp_olp_new?ie=UTF8&amp;amp;condition=new" target="_blank"&gt;http://www.amazon.com/gp/offer-listing/B0002F7MX6/ref=dp_olp_new?ie=UTF8&amp;amp;condition=new&lt;/a&gt;&amp;nbsp; ( for ASIN&amp;nbsp;B0002F7MX6)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
WebScrapeMaster FTW&lt;/h3&gt;
Its how I figured it out using &lt;a href="http://motyar.info/webscrapemaster/" target="_blank"&gt;WebScrapeMaster API&lt;/a&gt;, I know the url, I know the xpath of the information I need. This simple call solved my problem&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://2.bp.blogspot.com/-Ps-wAAPMC1U/UFRxN0p8LOI/AAAAAAAAClY/2SZ6foQyDOk/s1600/Capture.PNG" target="_blank"&gt;http://motyar.info/webscrapemaster/api/?key=YOUR_API_KEY&amp;amp;url=http://www.amazon.com/gp/offer-listing/B00005BRNO/ref=dp_olp_new?ie=UTF8&amp;amp;condition=new&amp;amp;xpath=span.price&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;And I got the output in this simple JSON format:-
&lt;br /&gt;
&lt;br /&gt;
&lt;img alt="Amazon Offers Price Tracking using WebScrapeMaster" src="http://2.bp.blogspot.com/-Ps-wAAPMC1U/UFRxN0p8LOI/AAAAAAAAClY/2SZ6foQyDOk/s1600/Capture.PNG" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://motyar.info/webscrapemaster/" target="_blank"&gt;Check the WebScrapeMaster API here.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2012/12/amazon-offers-price-tracking-using.html</link><author>noreply@blogger.com (Motyar D)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-Ps-wAAPMC1U/UFRxN0p8LOI/AAAAAAAAClY/2SZ6foQyDOk/s72-c/Capture.PNG" height="72" width="72" /></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-8794904740597159446</guid><pubDate>Fri, 14 Dec 2012 11:23:00 +0000</pubDate><atom:updated>2012-12-14T16:53:23.380+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">mp3</category><category domain="http://www.blogger.com/atom/ns#">php</category><title>Read mp3 file info with PHP</title><description>I know there are a lot of PHP libraries out there you can use to read ID3 tags from a MP3 file.
But here is the simplest one.
&lt;pre&gt;&lt;code&gt;
$file = "path/to/file.mp3";
$data = file_get_contents($file);
if(substr($data, -128, -125)=="TAG"){
 echo "Title: ".substr($data, -125, -95);
 echo "Artist: ".substr($data, -95, -65);
 echo "Album: ".substr($data, -65, -35);
 echo "Year: ".substr($data, -35, -31);
 echo "Comment: ".substr($data, -31, -1);
 echo "Genre: ".$genre_arr[ord(substr($data, -1, 1))];
 }
&lt;/code&gt;&lt;/pre&gt;
&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2012/12/read-mp3-file-info-with-php.html</link><author>noreply@blogger.com (Motyar D)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-9128903844855642220</guid><pubDate>Sat, 08 Dec 2012 12:33:00 +0000</pubDate><atom:updated>2012-12-08T18:27:39.011+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Application</category><category domain="http://www.blogger.com/atom/ns#">idea</category><category domain="http://www.blogger.com/atom/ns#">money</category><category domain="http://www.blogger.com/atom/ns#">Internet</category><title>Getting paid on Internet is Easy</title><description>My friends ask me about how to get paid for a service or product they can offer to someone over internet. Writing this post for all of them and for everyone who thinks about how to do this.
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Its so easy&lt;/h3&gt;
Yes its. You have to have an PayPal id and a bank account you can connect to your Paypal account.
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Getting paid on a Web Page&lt;/h3&gt;
You simply have to put this code (Please edit/insert all your&amp;nbsp;YourPayPalId&amp;nbsp;nd amount etc.). You can make few fields as text or selection box so they can enter amount and/or choose "what they are paying for".&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
&amp;lt;form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post" &amp;gt;
&amp;lt;input type="hidden" name="cmd" value="_xclick"&amp;gt;
&amp;lt;input type="hidden" name="business" value="YourPayPalId"&amp;gt;
&amp;lt;input type="hidden" name="image_url" value=""&amp;gt;
&amp;lt;input type="hidden" name="cpp_header_image" value=""&amp;gt;
&amp;lt;input type="hidden" name="currency_code" value="USD"&amp;gt;
&amp;lt;input type="hidden" name="item_name" value="Web Consultancy"&amp;gt;
&amp;lt;input type="hidden" name="amount" value="25.00"&amp;gt;
&amp;lt;input type="submit" value="Pay now" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
Demo&lt;/h3&gt;
Sure try it - (Note this is a working demo, Money will be paid to me in real)&lt;br /&gt;
&lt;form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="_xclick"&gt;
&lt;input name="cmd" type="hidden" value="_xclick" /&gt;
&lt;input name="business" type="hidden" value="dharmmotyar@gmail.com" /&gt;
&lt;input name="currency_code" type="hidden" value="USD" /&gt;
&lt;input name="item_name" type="hidden" value="Web Consultancy" /&gt;
Amount: &lt;input name="amount" type="text" value="10.00" /&gt;
&lt;input type="submit" value="Pay Now" /&gt;
&lt;/form&gt;
&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2012/12/getting-paid-on-internet-is-easy.html</link><author>noreply@blogger.com (Motyar D)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-3218850676340399896</guid><pubDate>Fri, 30 Nov 2012 06:19:00 +0000</pubDate><atom:updated>2012-11-30T12:17:55.474+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">mobile-dev</category><category domain="http://www.blogger.com/atom/ns#">api</category><category domain="http://www.blogger.com/atom/ns#">Internet</category><title>Why Every Company Should Have APIs</title><description>&lt;h3&gt;
Whats an API?&lt;/h3&gt;
An application programming interface (API) provides access to the data and services a company is providing in "raw form" (JSON, XML etc) and allows to use that data in diverse ways to get and give value. APIs are the best way to get your services out there and used.
&lt;br /&gt;
&lt;br /&gt;
Technically API allows and manages the interaction between two internet connected services. This can be:
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;
Getting share price data from the Stock Exchange into a web application.
&lt;/li&gt;
&lt;li&gt;
The ability to get Facebook share count for an url.
&lt;/li&gt;
&lt;li&gt;
Ability to share on twitter form within a mobile application.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
APIs allow data from one online service to flow outside of it, be it through an app or a mashup with another Internet service.
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Why Every Company should have an API?&lt;/h3&gt;
See the curve of ProgrammableWeb's path to a directory with 5,000 APIs:
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-e302AUum7kg/ULg4NQ6g81I/AAAAAAAACn0/CIvVcYt2p-w/s1600/api-growth-2012-600x339-520x293.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="360" src="http://4.bp.blogspot.com/-e302AUum7kg/ULg4NQ6g81I/AAAAAAAACn0/CIvVcYt2p-w/s640/api-growth-2012-600x339-520x293.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
There are lot of good reasons for a company to create an API and offer it to  developers. Here are few:&lt;br /&gt;&lt;br /&gt;
Think about Amazon, eBay, Facebook, Twitter, Salesforce, Google Maps, Flickr, UPS, etc. They provide APIs on which hundreds of thousands of &lt;b&gt;developers create mashup for millions of users worldwide&lt;/b&gt;.
&lt;br /&gt;
&lt;br /&gt;
Few B2B / SAAS platforms provide API to integrate with their back-end system having an API here &lt;b&gt;cuts down on the support costs &lt;/b&gt;of doing this individually with each customers, increases engagement with your customers.
&lt;br /&gt;
&lt;br /&gt;
Other benefit from partners. They can take content and services to integrate into their own applications. Having an API means &lt;b&gt;partners can bring your brand and services to large audiences they already have&lt;/b&gt;.  
&lt;br /&gt;
&lt;br /&gt;
It's worth building a website "API first" - that is; design the data/service API up front  and make &lt;b&gt;your web application the first client of your API&lt;/b&gt;. It gives you a huge amount of flexibility when new formats and partners start using it. 
&lt;br /&gt;
&lt;br /&gt;
Let think about the Mobile, what about iphone, ipods, tablets. it's very hard for a startup to &lt;b&gt;support multiple clients on multiple platforms&lt;/b&gt; from day one - so having an API early means people can help themselves and integrate your content/services into other applications.   
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Have I missed any important point? I’d love your thoughts on this topic or other important outcomes providing an API can offers.&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2012/11/why-every-company-should-have-apis.html</link><author>noreply@blogger.com (Motyar D)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-e302AUum7kg/ULg4NQ6g81I/AAAAAAAACn0/CIvVcYt2p-w/s72-c/api-growth-2012-600x339-520x293.png" height="72" width="72" /></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-6008323861444783301</guid><pubDate>Fri, 23 Nov 2012 16:00:00 +0000</pubDate><atom:updated>2012-11-23T21:30:10.682+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tutorials</category><category domain="http://www.blogger.com/atom/ns#">nodejs</category><title>Host your first NodeJs app on Heroku in 5 mins</title><description>&lt;a href="http://www.heroku.com/" target="_blank"&gt;Heroku&lt;/a&gt; is a cloud platform as a service (PaaS), A cloud platforms that supports Java, Node.js, Scala, Clojure and Python and PHP (undocumented). 

It provides small Ubuntu virtual server instances that can be spun up and down on demand. Each instance (dynos). You get one dyno for free each month (per app).

So lets get started :-
&lt;br /&gt;
&lt;br /&gt;
Step 1 - Signup for Heroku. Its easy go to - &lt;a href="https://api.heroku.com/signup/devcenter" target="_blank"&gt;https://api.heroku.com/signup/devcenter&lt;/a&gt;&lt;br /&gt;
Step 2 - Install the &lt;a href="https://toolbelt.heroku.com/" target="_blank"&gt;Heroku Toolbelt&lt;/a&gt; on your local workstation.&lt;br /&gt;
Step 3 - &lt;a href="http://motyar.blogspot.in/2012/11/write-and-run-your-first-nodejs-app-on.html" target="_blank"&gt;Write your nodejs app&lt;/a&gt;.&lt;br /&gt;
Step 4 -&amp;nbsp;Store your app in Git&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;$ git init
$ git add .
$ git commit -m "init"
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Step 5 - Create a Heroku App
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
$ heroku create
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Or, if you'd like to set a name, (i.e. myname.herokuapp.com) use:
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
$ heroku create myname
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Step 6 - Deploy your code
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
$ git push heroku master
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Step 7 - Visit your application. Simply open the http://myname.herokuapp.com in browser. We can now visit the app in our browser with heroku open.
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
$ heroku open
&lt;/code&gt;&lt;/pre&gt;
&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2012/11/host-your-first-nodejs-app-on-heroku-in.html</link><author>noreply@blogger.com (Motyar D)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-419817549475060256</guid><pubDate>Fri, 23 Nov 2012 15:54:00 +0000</pubDate><atom:updated>2012-11-23T21:24:51.003+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tutorials</category><category domain="http://www.blogger.com/atom/ns#">nodejs</category><title>Write and run your first nodejs app on Windows</title><description>Node.js is a server side software system designed for writing server side JS. Node.js was created by Ryan Dahl starting in 2009, and its growth is sponsored by Joyent, his employer.

Getting started with nodejs is easy. &lt;br /&gt;
&lt;br /&gt;
Simply follow these simple steps:-
&lt;br /&gt;
&lt;br /&gt;
Step 1. &lt;a href="http://nodejs.org/dist/v0.6.15/node-v0.6.15.msi"&gt;Download&lt;/a&gt; and install nodejs for window. It will install Node and npm. And will be accessible from cmd.exe.&lt;br /&gt;
&lt;br /&gt;
Step 2. Open command prompt and create a app directory, go to the directory.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;(i) Create a file called package.json:
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
{
  "name": "hello"
, "version": "0.0.1"
, "dependencies": {
    "express": "latest"
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
(ii) run npm install to install Express:
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;npm install&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
This will read the package.json in the root of the app and download all of the dependencies that you are missing.
&lt;br /&gt;
&lt;br /&gt;
(iii) Make a file that contains a simple app index.js:
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
var express = require('express')
  , app = express.createServer();

app.get('/', function(req, res) {
  res.send('Hello World !');
});

app.listen(3000)
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Step 3. Run it with 
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;node index.js&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
and visit http://localhost:3000/ in a browser. You should see "Hello World !".&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2012/11/write-and-run-your-first-nodejs-app-on.html</link><author>noreply@blogger.com (Motyar D)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-1542098770770450979</guid><pubDate>Fri, 16 Nov 2012 18:06:00 +0000</pubDate><atom:updated>2012-11-16T23:38:06.087+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tip</category><category domain="http://www.blogger.com/atom/ns#">Javascript</category><category domain="http://www.blogger.com/atom/ns#">hacks</category><category domain="http://www.blogger.com/atom/ns#">html5</category><title>Generate and download a file in pure javascript</title><description>Here is a question.&lt;br /&gt;
&lt;br /&gt;
Is&amp;nbsp;generating files possible with JavaScript alone?
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I am sharing an idea, let me know how we can improve it or how useful this is.&amp;nbsp;
&lt;br /&gt;
We are going to use the dataURI and&amp;nbsp;&lt;a href="http://updates.html5rocks.com/2011/08/Downloading-resources-in-HTML5-a-download"&gt;A[DOWNLOAD]&lt;/a&gt;&amp;nbsp;in this example.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
window.location.href="data:text/plain,text goes here";
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Check this simple prototype here - &lt;a href="http://jsbin.com/uwoxat" target="_blank"&gt;http://jsbin.com/uwoxat &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2012/11/generate-and-download-file-in-pure.html</link><author>noreply@blogger.com (Motyar D)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-736122317524632743</guid><pubDate>Tue, 13 Nov 2012 06:35:00 +0000</pubDate><atom:updated>2012-11-13T12:05:50.473+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">joke</category><category domain="http://www.blogger.com/atom/ns#">html5</category><title>How to tell HTML from HTML5?</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-cuBmNnRYLIw/UKHp9g1X1KI/AAAAAAAACnY/RYW4ouu0hkA/s1600/Screen_shot_2011-03-27_at_3.28.08_PM.png.scaled1000.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-cuBmNnRYLIw/UKHp9g1X1KI/AAAAAAAACnY/RYW4ouu0hkA/s1600/Screen_shot_2011-03-27_at_3.28.08_PM.png.scaled1000.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Try it out on Internet Explorer.&lt;/li&gt;
&lt;li&gt;Did it work?&lt;/li&gt;
&lt;li&gt;No?&lt;/li&gt;
&lt;li&gt;It’s HTML5.&lt;/li&gt;
&lt;/ul&gt;
— &lt;a href="http://twitter.com/kentbrew"&gt;Kent Brewster&lt;/a&gt; at SXSW11&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2012/11/how-to-tell-html-from-html5.html</link><author>noreply@blogger.com (Motyar D)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-cuBmNnRYLIw/UKHp9g1X1KI/AAAAAAAACnY/RYW4ouu0hkA/s72-c/Screen_shot_2011-03-27_at_3.28.08_PM.png.scaled1000.png" height="72" width="72" /></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-7520241590484664328</guid><pubDate>Sat, 15 Sep 2012 05:09:00 +0000</pubDate><atom:updated>2012-12-06T23:02:58.124+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tip</category><category domain="http://www.blogger.com/atom/ns#">api</category><category domain="http://www.blogger.com/atom/ns#">idea</category><category domain="http://www.blogger.com/atom/ns#">hacks</category><category domain="http://www.blogger.com/atom/ns#">json</category><title>Web Scrape Master : Because Not Every Company Have APIs.</title><description>I built &lt;a href="http://motyar.info/webscrapemaster/" target="_blank"&gt;WebScrapeMaster&lt;/a&gt; because not &lt;a href="http://motyar.blogspot.com/2012/11/why-every-company-should-have-apis.html"&gt;every company have APIs&lt;/a&gt; to provide access to data.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Web scrape master provides a very simple JSONP API for retrieving data. You can use the API by making a GET request.

The API response is always an JSON object.&lt;br /&gt;
&lt;br /&gt;
Check this here 

&lt;br /&gt;
&lt;a href="http://motyar.info/webscrapemaster/" target="_blank"&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;
&lt;a href="http://motyar.info/webscrapemaster/" target="_blank"&gt;Web scrape master&lt;/a&gt;&lt;/h3&gt;
&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2012/09/web-scrape-master-idea.html</link><author>noreply@blogger.com (Motyar D)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-7135532730444722810</guid><pubDate>Sun, 02 Sep 2012 06:05:00 +0000</pubDate><atom:updated>2012-09-02T11:35:49.399+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tip</category><category domain="http://www.blogger.com/atom/ns#">hacks</category><category domain="http://www.blogger.com/atom/ns#">php</category><category domain="http://www.blogger.com/atom/ns#">Internet</category><title>Get the Image link of a Tumblr post</title><description>I was trying trying &lt;a href="http://ifttt.com/" target="_blank"&gt;IFTTT&lt;/a&gt; and wanted to save my &lt;a href="http://www.tumblr.com/" target="_blank"&gt;Tumblr&lt;/a&gt; liked image post to &lt;a href="http://db.tt/gxvaKcSO" target="_blank"&gt;Dropbox&lt;/a&gt;. Searched Google for it but found nothing I can get direct image link with post url. So I decided to scrape post html to get link.&lt;br /&gt;
&lt;br /&gt;
TIP: When you have to scrape and web page think about its mobile version, they are&amp;nbsp;always&amp;nbsp;light weighted and with simple dom&amp;nbsp;structures.&lt;br /&gt;
&lt;br /&gt;
Tumblr provides a mobile version for their blogs, you can open this my simply putting /mobile at &amp;nbsp;the end of home page url. So its its xyz.tumblr.com, mobile version ll be at xyz.tumblr.com/mobile.&lt;br /&gt;
&lt;br /&gt;
Here is simple PHP function that returns the image permalink by post url.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
function getImg($postUrl){
	$url = explode("/", $postUrl);
	$data = file_get_contents("htt"."p://".$url[2]."/mobile/post/".$url[4]);
	preg_match_all('',$data,$matches,PREG_PATTERN_ORDER);
	return $matches[1][0];
}
&lt;/code&gt;&lt;/pre&gt;

Hope this ll help you.
&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2012/09/get-image-link-of-tumblr-post.html</link><author>noreply@blogger.com (Motyar D)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-930461394751492536</guid><pubDate>Sat, 07 Jul 2012 16:30:00 +0000</pubDate><atom:updated>2012-07-07T22:00:05.406+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tip</category><category domain="http://www.blogger.com/atom/ns#">php</category><title>Php Object to Array</title><description>Want to share a simple but very useful php function. It helped me in many projects while parsing XML. We got simple Object by loading XML with simplexml_load_string or simplexml_load_file. This function converts a complex object to array.&lt;br /&gt;
&lt;br /&gt;
Its more easy to parse and&amp;nbsp;access and array than a object&lt;br /&gt;
Here is the function

&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;

//Function returns array by a SimpleXmlObject
function object2array($object){
    $return = NULL;
      
    if(is_array($object))
    {
        foreach($object as $key =&amp;gt; $value)
            $return[$key] = object2array($value);
    }
    else
    {
        $var = get_object_vars($object);
          
        if($var)
        {
            foreach($var as $key =&amp;gt; $value)
                $return[$key] = ($key &amp;amp;&amp;amp; !$value) ? NULL : object2array($value);
        }
        else return $object;
    }

    return $return;
}


&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2012/07/php-object-to-array.html</link><author>noreply@blogger.com (Motyar D)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-7874971354376179829</guid><pubDate>Fri, 01 Jun 2012 13:56:00 +0000</pubDate><atom:updated>2012-06-01T19:26:03.939+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">codeplayers</category><title>Leaving CodePlayers</title><description>Many of you know this already, but most of you probably don't. I've left the CodePlayers after two unbelievable years. It's bittersweet. I don't regret my decision but I ll miss&amp;nbsp;&lt;a href="https://twitter.com/designermozi" target="_blank"&gt;Mozi&lt;/a&gt;&amp;nbsp;and the rest of the CodePlayers team.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What's Next?&lt;/b&gt;&lt;br /&gt;
I'm not sure what's next for me, but one thing is for sure, I will miss working with&amp;nbsp;my co-founder, friend and designer&amp;nbsp;&lt;a href="https://twitter.com/designermozi" target="_blank"&gt;Mozi&lt;/a&gt;. He impacted my life in so many ways.&lt;br /&gt;
&lt;br /&gt;
I'm excited about some of the recent changes and the direction the company is taking. CodePlayers will be around for a long time, and I'm so excited to have been a big part of how it got to where it is today.&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2012/06/leaving-codeplayers.html</link><author>noreply@blogger.com (Motyar D)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-8156743013776453694</guid><pubDate>Fri, 25 May 2012 16:23:00 +0000</pubDate><atom:updated>2012-12-17T08:05:58.422+05:30</atom:updated><title>Generating QR code of current Page URL</title><description>Thank Japan for &lt;a href="http://en.wikipedia.org/wiki/QR_code"&gt;QR code&lt;/a&gt;, or &lt;b&gt;Quick Response Code&lt;/b&gt;.&lt;br /&gt;
And thanks Google to making the creation of QR codes so simple, Google have an API for it.&lt;br /&gt;
&lt;br /&gt;
You can see a lot of QR codes in print media, The objective to use is to take people from the physical world to the online world.&lt;br /&gt;
&lt;br /&gt;
Web pages use them to let users scan and open the app store url of apps, or to open any page in mobile browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Today I want to share a&lt;b&gt; code that can help a web page to display its own URL as QR code&lt;/b&gt;, the code uses Google chart API and small JavaScript Code.&lt;br /&gt;
Here is the code:&lt;vr&gt;&amp;nbsp;&lt;/vr&gt;&lt;br /&gt;
&lt;vr&gt;&lt;br /&gt;&lt;/vr&gt;
&lt;vr&gt;&lt;b&gt;HTML code:
&lt;/b&gt;&lt;/vr&gt;&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
&amp;lt;img id="qr" /&amp;gt;
&lt;/code&gt;
&lt;/pre&gt;
&lt;b&gt;JavaScript Code:&lt;/b&gt;&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
document.body.onload = function(){
  document.getElementById("qr").
   setAttribute(
   'src',
   'http://chart.apis.google.com/chart?cht=qr&amp;amp;chs=100x100&amp;amp;chld=H|0&amp;amp;chl='+window.location
   );
};
&lt;/code&gt;
&lt;/pre&gt;
You can change size of image by editing the chs parameter.&lt;br /&gt;
&lt;b&gt;Demo&lt;/b&gt;&lt;br /&gt;
Here is the QR code for current page, generated by the code above.&lt;br /&gt;
&lt;img id="qr" /&gt;
&lt;script&gt;
document.body.onload = function(){
  document.getElementById("qr").
   setAttribute(
   'src',
   'http://chart.apis.google.com/chart?cht=qr&amp;chs=300x300&amp;chld=H|0&amp;chl='+window.location
   );
};
&lt;/script&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Hope this code will help you.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2012/05/scan-to-open-this-page-in-mobile.html</link><author>noreply@blogger.com (Motyar D)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-8260282949069911374</guid><pubDate>Thu, 17 May 2012 11:25:00 +0000</pubDate><atom:updated>2012-05-17T16:55:33.265+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">video</category><category domain="http://www.blogger.com/atom/ns#">Tip</category><category domain="http://www.blogger.com/atom/ns#">resource</category><title>How You Can Be a Memory Champion</title><description>There are people who can quickly memorize lists of thousands of numbers, the order of all the cards in a deck (or ten!), and much more. U.S. Memory Championship Winner Joshua Foer describes the technique - called the memory palace. Check it out:-
&lt;br /&gt;
&lt;br /&gt;
&lt;object height="374" width="526"&gt;
&lt;param name="movie" value="http://video.ted.com/assets/player/swf/EmbedPlayer.swf"&gt;


&lt;/param&gt;
&lt;param name="allowFullScreen" value="true" /&gt;



&lt;param name="allowScriptAccess" value="always"/&gt;



&lt;param name="wmode" value="transparent"&gt;


&lt;/param&gt;
&lt;param name="bgColor" value="#ffffff"&gt;


&lt;/param&gt;
&lt;param name="flashvars" value="vu=http://video.ted.com/talk/stream/2012/Blank/JoshuaFoer_2012-320k.mp4&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/JoshuaFoer_2012-embed.jpg&amp;vw=512&amp;vh=288&amp;ap=0&amp;ti=1443&amp;lang=&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=joshua_foer_feats_of_memory_anyone_can_do;year=2012;theme=how_the_mind_works;theme=numbers_at_play;theme=ted_under_30;event=TED2012;tag=brain;tag=culture;tag=memory;tag=neuroscience;tag=science;&amp;preAdTag=tconf.ted/embed;tile=1;sz=512x288;" /&gt;



&lt;embed src="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" pluginspace="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" bgColor="#ffffff" width="526" height="374" allowFullScreen="true" allowScriptAccess="always" flashvars="vu=http://video.ted.com/talk/stream/2012/Blank/JoshuaFoer_2012-320k.mp4&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/JoshuaFoer_2012-embed.jpg&amp;vw=512&amp;vh=288&amp;ap=0&amp;ti=1443&amp;lang=&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=joshua_foer_feats_of_memory_anyone_can_do;year=2012;theme=how_the_mind_works;theme=numbers_at_play;theme=ted_under_30;event=TED2012;tag=brain;tag=culture;tag=memory;tag=neuroscience;tag=science;&amp;preAdTag=tconf.ted/embed;tile=1;sz=512x288;"&gt;&lt;/embed&gt;
&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2012/05/how-you-can-be-memory-champion.html</link><author>noreply@blogger.com (Motyar D)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-5732283401199582732</guid><pubDate>Wed, 04 Apr 2012 08:56:00 +0000</pubDate><atom:updated>2012-04-04T14:26:33.131+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Javascript</category><category domain="http://www.blogger.com/atom/ns#">html5</category><category domain="http://www.blogger.com/atom/ns#">css</category><title>Adding Dynamic CSS style rules with Data URIs and JavaScript</title><description>&lt;h2&gt;Whats the Data URIs?&lt;/h2&gt;Data URI scheme provides a way to resources to be fetched in a single HTTP request. which is more efficient&lt;br /&gt;
&lt;h3&gt;The format&lt;/h3&gt;data:[mime type=""][;charset=charset][;base64],encoded data=""&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;The Why?&lt;/h3&gt;It saves HTTP Requests, and make webpages load faster.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Adding Dynamic Style&lt;/h2&gt;How we do it with jQuery:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;$('h1').css("color","red");&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
How we do it with palin JavaScript:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;document.getElementById("hello").style.color = "#000267";&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
And using DataURIs.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
function addStyle(css){
            var datuURIs = document.createElement("link");
            document.head = document.head || document.getElementsByTagName('head'[0]);
            datuURIs.href = "data:text/css,"+css;
            datuURIs.rel = "stylesheet";
            document.head.appendChild(datuURIs);
        }

addStyle('h1{color:pink;}');

addStyle('h2{width:200px;}body{background:yellow}');

&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
I think doing it using DataURI is easy, because it looks same like CSS code. You just have to use one JS function and can add style rules anywhere in the JS code, whenever you want one the fly.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://jsbin.com/iruciw/2/edit#html,live" target="_blank"&gt;Try the code here&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
Feel free to share your thought about it. I am on twitter as &lt;a href="http://twitter.com/motyar" target="_blank"&gt;@motyar&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2012/04/adding-dynamic-css-style-rules-with.html</link><author>noreply@blogger.com (Motyar D)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-4610413171538351497</guid><pubDate>Sun, 01 Apr 2012 05:19:00 +0000</pubDate><atom:updated>2013-03-14T07:36:12.819+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Javascript</category><category domain="http://www.blogger.com/atom/ns#">html5</category><title>HTML5 Full Screen</title><description>Its how wishes come true. I love the new "Full Screen API" form HTML5. Just want to share code about how get started using it.&lt;br /&gt;
&lt;br /&gt;
Facebook started using it, you can see a small button on photo lightbox.&lt;br /&gt;
Update : You can &lt;a href="http://motyar.info/fullscreen/" target="_blank"&gt;add fullscreen button to your website&lt;/a&gt; too.

&lt;br /&gt;
&lt;h2&gt;
Going fullscreen&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;
var docElm = document.documentElement;
if (docElm.requestFullscreen) {
    docElm.requestFullscreen();
}
else if (docElm.mozRequestFullScreen) {
    docElm.mozRequestFullScreen();
}
else if (docElm.webkitRequestFullScreen) {
    docElm.webkitRequestFullScreen();
}
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Cancelling fullscreen&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;
if (document.exitFullscreen) {
    document.exitFullscreen();
}
else if (document.mozCancelFullScreen) {
    document.mozCancelFullScreen();
}
else if (document.webkitCancelFullScreen) {
    document.webkitCancelFullScreen();
}
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Detecting fullscreen state change&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;
document.addEventListener("fullscreenchange", function () {
    fullscreenState.innerHTML = (document.fullscreen)? "" : "not ";
}, false);

document.addEventListener("mozfullscreenchange", function () {
    fullscreenState.innerHTML = (document.mozFullScreen)? "" : "not ";
}, false);

document.addEventListener("webkitfullscreenchange", function () {
    fullscreenState.innerHTML = (document.webkitIsFullScreen)? "" : "not ";
}, false);
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Styling fullscreen mode&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;
html:-moz-full-screen {
    background: red;
}

html:-webkit-full-screen {
    background: red;
}

html:fullscreen {
    background: red;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;h2&gt;
Browser support&lt;/h2&gt;
Currently available in Firefox 10 and up and Google Chrome since version 15 and Safari since 5.1.&lt;br /&gt;
&lt;br /&gt;
Check -&amp;nbsp;&lt;a href="http://motyar.info/fullscreen/"&gt;http://motyar.info/fullscreen/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2012/04/html5-full-screen.html</link><author>noreply@blogger.com (Motyar D)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-8782470545007448188</guid><pubDate>Tue, 06 Mar 2012 12:34:00 +0000</pubDate><atom:updated>2012-05-20T17:36:51.774+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">resource</category><category domain="http://www.blogger.com/atom/ns#">links</category><title>Define “Entrepreneur”</title><description>&lt;div style="text-align: left;"&gt;
&lt;span style="color: #525547; font-family: 'Droid Sans', sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 21px;"&gt;Let’s see what you think it means. In this post’s comments , explain “Entrepreneur” in 10 words or less.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2012/03/define-entrepreneur.html</link><author>noreply@blogger.com (Motyar D)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7339286656747792301.post-932780920853653572</guid><pubDate>Wed, 15 Feb 2012 16:54:00 +0000</pubDate><atom:updated>2012-02-15T22:24:37.069+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">html5</category><category domain="http://www.blogger.com/atom/ns#">resource</category><category domain="http://www.blogger.com/atom/ns#">links</category><title>Make your website fast using HTML5</title><description>Paul Irish writes about few &lt;a href="http://motyar.blogspot.com/search/label/html5" target=""&gt;HTML5 techniques&lt;/a&gt; you can use in your website to make it fast. He talks about &lt;a href="http://motyar.blogspot.com/2011/09/offline-web-applications-using-html5.html"&gt;HTML5 Application Cache&lt;/a&gt;, suggest using web storage in place of cookies, for animations CSS transitions instead of JavaScript if possible.&lt;br /&gt;
&lt;br /&gt;
Here is how you can create a &lt;a href="http://motyar.blogspot.com/2011/09/creating-cache-manifest-file-using-php.html"&gt;dynamic Application Cache Manifest file using PHP&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
You can read the full article here:- &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.html5rocks.com/en/tutorials/speed/quick" target="_blank"&gt;BEST PRACTICES FOR A FASTER WEB APP WITH HTML5&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;http://codeplayers.com&lt;/div&gt;</description><link>http://motyar.blogspot.com/2012/02/make-your-website-fast-using-html5.html</link><author>noreply@blogger.com (Motyar D)</author></item></channel></rss>
