<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' 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'><id>tag:blogger.com,1999:blog-8433993357782127652</id><updated>2024-08-28T09:13:29.834-07:00</updated><title type='text'>PHP API</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://apiphp.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8433993357782127652/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://apiphp.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anil Kumar</name><uri>http://www.blogger.com/profile/04198191208103967911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkfEyGmIxO-GurRNPI3VzNbr21aBlSAaqj7YI-5LGGpOBvzDsslsFISTg-JL0ZmK7begAlKSPIE4z8S8AJAz3RCK7ifUZNSmdQa464mqMS3iNwIwISoVAB6lWykBc79lY/s220/14082011148.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8433993357782127652.post-7408355107685843008</id><published>2011-11-24T04:17:00.000-08:00</published><updated>2011-11-24T04:17:45.418-08:00</updated><title type='text'>Misso API and Oauth Connect</title><content type='html'>You want to use misso api to connect and getting user data then follow the following step.&lt;br /&gt;
&lt;br /&gt;
1.Go to this url &lt;a href=&quot;http://gomiso.com/developers/sample_code&quot;&gt;http://gomiso.com/developers/sample_code&lt;/a&gt; and download your code of php.&lt;br /&gt;
&lt;br /&gt;
2. Extract the code and there is two file.&lt;br /&gt;
        &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;  a) request.php&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;  b) callback.php&lt;br /&gt;
&lt;br /&gt;
3. Just change your consumer key and consumer secret key.&lt;br /&gt;
&lt;br /&gt;
4. Now go to the following url, download oauth-php-175.tar.gz.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://code.google.com/p/oauth-php/downloads/detail?name=oauth-php-175.tar.gz&amp;can=2&amp;q=&quot;&gt;http://code.google.com/p/oauth-php/downloads/detail?name=oauth-php-175.tar.gz&amp;can=2&amp;q=&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
5. After extract there is an oauth-php folder, place this folder with request and callback php file, according to your include_once &quot;oauth-php/library/OAuthStore.php&quot;; in request file.&lt;br /&gt;
&lt;br /&gt;
6.Create a database php_test.&lt;br /&gt;
&lt;br /&gt;
7.Open oauth-php folder and go to sql file, Path is following.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; oauth-php\library\store\mysql\mysql.sql =&gt; Import this file in your database.&lt;br /&gt;
&lt;br /&gt;
8. Most important thing change your $callback_uri path in request.php file, My path is like this&lt;br /&gt;
  &amp;nbsp; $callback_uri = &#39;http://localhost/oauth/misso/callback.php&#39;;//line 31(request.php)&lt;br /&gt;
&lt;br /&gt;
9. for every time test empty oauth_consumer_registry table,other wise give error because you are doing same authentication second time for same user. other wise give error already exist.&lt;br /&gt;
&lt;br /&gt;
10. Run your request.php and authorize the user on callback.php return user information.&lt;br /&gt;
&lt;br /&gt;
11. use this information. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Download Misso Api and Oauth Authentication document of all detail from following&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;font size=&quot;1&quot;&gt;&lt;a href=&quot;http://www.docstoc.com/docs/104879280/Misso-API&quot;&gt;Misso API&lt;/a&gt;&lt;/font&gt;&lt;br /&gt;&lt;object id=&quot;_ds_104879280&quot; name=&quot;_ds_104879280&quot; width=&quot;560&quot; height=&quot;750&quot; type=&quot;application/x-shockwave-flash&quot; data=&quot;http://viewer.docstoc.com/&quot;&gt;&lt;param name=&quot;FlashVars&quot; value=&quot;doc_id=104879280&amp;mem_id=20263966&amp;showrelated=1&amp;showotherdocs=1&amp;doc_type=doc&amp;allowdownload=1&quot; /&gt;&lt;param name=&quot;movie&quot; value=&quot;http://viewer.docstoc.com/&quot;/&gt;&lt;param name=&quot;wmode&quot;  value=&quot;opaque&quot; /&gt;&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot; /&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot; /&gt;&lt;/object&gt;&lt;br /&gt;&lt;script type=&quot;text/javascript&quot;&gt;var docstoc_docid=&quot;104879280&quot;;var docstoc_title=&quot;Misso API&quot;;var docstoc_urltitle=&quot;Misso API&quot;;&lt;/script&gt;&lt;script type=&quot;text/javascript&quot; src=&quot;http://i.docstoccdn.com/js/check-flash.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;For all view click on following. &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
http://www.docstoc.com/docs/document-preview.aspx?doc_id=104879280</content><link rel='replies' type='application/atom+xml' href='http://apiphp.blogspot.com/feeds/7408355107685843008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://apiphp.blogspot.com/2011/11/misso-api-and-oauth-connect.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8433993357782127652/posts/default/7408355107685843008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8433993357782127652/posts/default/7408355107685843008'/><link rel='alternate' type='text/html' href='http://apiphp.blogspot.com/2011/11/misso-api-and-oauth-connect.html' title='Misso API and Oauth Connect'/><author><name>Anil Kumar</name><uri>http://www.blogger.com/profile/04198191208103967911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkfEyGmIxO-GurRNPI3VzNbr21aBlSAaqj7YI-5LGGpOBvzDsslsFISTg-JL0ZmK7begAlKSPIE4z8S8AJAz3RCK7ifUZNSmdQa464mqMS3iNwIwISoVAB6lWykBc79lY/s220/14082011148.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8433993357782127652.post-1188807419011997401</id><published>2011-11-21T23:38:00.000-08:00</published><updated>2011-11-22T01:26:57.598-08:00</updated><title type='text'>Google Weather API</title><content type='html'>&lt;style&gt;
.contentBody{color:#000000; margin-left:20px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:14px;}
.inst{color:#000000;}
.phcode{color:#663300; font-size:12px; font-family:Geneva, Arial, Helvetica, sans-serif background:#FFFFFF}
&lt;/style&gt;&lt;br /&gt;
&lt;div class=&#39;contentBody&#39;&gt;&lt;div class=&quot;inst&quot;&gt;&lt;b style=&quot;color:#280000;&quot;&gt;&lt;u&gt;Instruction:-&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
1. You can take an array at the place of $place_Name.&lt;br /&gt;
2. If any place temperature not shown this mean Google have no value that time&lt;br /&gt;
3. This an array run in for each&lt;br /&gt;
4. There is using if and else condition &lt;br /&gt;
5. because some city/state/country name does not support xml&lt;br /&gt;
6. Just copy and paste the code definately run &lt;br /&gt;
7. There is no error in file &lt;br /&gt;
8. Just change your place name on here &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;phcode&quot;&gt;//Copy code from here.&lt;br /&gt;
&lt;br /&gt;
$place_Name = &#39;chandigarh&#39;;&lt;br /&gt;
&lt;br /&gt;
$googleApiLink= &quot;http://www.google.com/ig/api?weather=&quot;.$place_Name.&quot;&amp;hl=en&quot;; &lt;br /&gt;
$xmlFunctionForDataLoad = @simplexml_load_file($googleApiLink);&lt;br /&gt;
&lt;br /&gt;
if($xmlFunctionForDataLoad)&lt;br /&gt;
{&lt;br /&gt;
$gettingWeatherData = $xmlFunctionForDataLoad-&gt;xpath(&quot;/xml_api_reply/weather/forecast_information&quot;);&lt;br /&gt;
$getData = $xmlFunctionForDataLoad-&gt;xpath(&quot;/xml_api_reply/weather/current_conditions&quot;);&lt;br /&gt;
$forecast_list = $xmlFunctionForDataLoad-&gt;xpath(&quot;/xml_api_reply/weather/forecast_conditions&quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
$url = file_get_contents($googleApiLink);&lt;br /&gt;
$xmlFunctionForDataLoad = iconv(&quot;iso-8859-1&quot;, &quot;utf-8&quot;, $url);&lt;br /&gt;
$xmlFunctionForDataLoad = simplexml_load_string($xmlFunctionForDataLoad);&lt;br /&gt;
$information = $xmlFunctionForDataLoad-&gt;xpath(&quot;/xml_api_reply/weather/forecast_information&quot;);&lt;br /&gt;
$getData = $xmlFunctionForDataLoad-&gt;xpath(&quot;/xml_api_reply/weather/current_conditions&quot;);&lt;br /&gt;
$forecast_list = $xmlFunctionForDataLoad-&gt;xpath(&quot;/xml_api_reply/weather/forecast_conditions&quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
echo ucfirst($place_Name).&#39; =&gt; &#39;.$getData[0]-&gt;temp_c[&#39;data&#39;].&#39;&amp;degC&#39;;&lt;br /&gt;
&lt;br /&gt;
//End of the code on there&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color:#663300;&quot;&gt;&lt;br /&gt;
1. Following given the document of this code.&lt;br /&gt;
2. You can read instruction and download code from below&lt;br /&gt;
3. See the following document and download  &lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;font size=&quot;2&quot;&gt;&lt;a href=&quot;http://www.docstoc.com/docs/104440578/Google-Weather-API-Code&quot;&gt;Google Weather API Code&lt;/a&gt;&lt;/font&gt;&lt;br /&gt;
&lt;embed id=&quot;_ds_104440578&quot; name=&quot;_ds_104440578&quot; width=&quot;550&quot; height=&quot;800&quot; type=&quot;application/x-shockwave-flash&quot; src=&quot;http://viewer.docstoc.com/&quot; + FlashVars=&quot;doc_id=104440578&amp;mem_id=20263966&amp;doc_type=doc&amp;fullscreen=0&amp;allowdownload=1&amp;showrelated=0&quot; allowScriptAccess=&quot;always&quot; allowFullScreen=&quot;true&quot;&gt;&lt;/embed&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;For Full Screen Click :-&lt;/i&gt;&lt;/b style=&quot;color:#700000 &quot;&gt;&lt;a href=&quot;http://www.docstoc.com/docs/document-preview.aspx?doc_id=104440578&quot;&gt;Google Weather API&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://apiphp.blogspot.com/feeds/1188807419011997401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://apiphp.blogspot.com/2011/11/google-weather-api.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8433993357782127652/posts/default/1188807419011997401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8433993357782127652/posts/default/1188807419011997401'/><link rel='alternate' type='text/html' href='http://apiphp.blogspot.com/2011/11/google-weather-api.html' title='Google Weather API'/><author><name>Anil Kumar</name><uri>http://www.blogger.com/profile/04198191208103967911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkfEyGmIxO-GurRNPI3VzNbr21aBlSAaqj7YI-5LGGpOBvzDsslsFISTg-JL0ZmK7begAlKSPIE4z8S8AJAz3RCK7ifUZNSmdQa464mqMS3iNwIwISoVAB6lWykBc79lY/s220/14082011148.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8433993357782127652.post-5848150378908796149</id><published>2011-11-20T22:08:00.000-08:00</published><updated>2011-11-21T00:35:47.111-08:00</updated><title type='text'>Amazon S3 (Simple Storage Services)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana, arial, helvetica, clean, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;Amazon S3 is storage for the Internet. Amazon&amp;nbsp;provides&amp;nbsp;the space for large&amp;nbsp;amount of data storing.The data will be upload from your site but store on amazon, your site just save the name of file.From file name data also retrieve on your site from amazon.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span style=&quot;background-color: white; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana, arial, helvetica, clean, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana, arial, helvetica, clean, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;For implementation on website just follow the following step.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana, arial, helvetica, clean, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana, arial, helvetica, clean, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;&amp;nbsp;1. Download the code from following and extract.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana, arial, helvetica, clean, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color:white; font-family: verdana, arial, helvetica, clean, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 18px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://net.tutsplus.com/tutorials/php/how-to-use-amazon-s3-php-to-dynamically-store-and-manage-files-with-ease/&quot;&gt;Click for Source code&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana, arial, helvetica, clean, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;2.&amp;nbsp;There are three file containing style.css, s3.php and page.php. Don&#39;t touch other files only open page.php&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; and define access,&amp;nbsp;secret&amp;nbsp;key . Following red word, you need to change with your given Amazon keys.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;if&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;(!&lt;/span&gt;defined&lt;span style=&quot;color: purple;&quot;&gt;(&lt;/span&gt;&#39;awsAccessKey&lt;span style=&quot;background-color: white;&quot;&gt;&#39;&lt;span style=&quot;color: purple;&quot;&gt;))&lt;/span&gt;&lt;/span&gt; define&lt;span style=&quot;color: purple;&quot;&gt;(&lt;/span&gt;&#39;awsAccessKey&#39;, &#39;&lt;span style=&quot;background-color: white; color: #cc0000;&quot;&gt;CHANGE THIS&lt;/span&gt;&#39;&lt;span style=&quot;color: purple;&quot;&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;(!&lt;/span&gt;defined&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&#39;awsSecretKey&#39;&lt;span style=&quot;color: purple;&quot;&gt;))&lt;/span&gt; define&lt;span style=&quot;color: purple;&quot;&gt;(&lt;/span&gt;&#39;awsSecretKey&#39;, &#39;&lt;span style=&quot;background-color: white; color: #cc0000;&quot;&gt;CHANGE THIS TOO&lt;/span&gt;&#39;&lt;span style=&quot;color: purple;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;3. You need to change your bucket name in follwing code. Write your bucket name on place of yourbucket.&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;remember yourbucket is your object and you can only made 100 bucket in one account.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$s3&lt;span style=&quot;color: purple;&quot;&gt;-&amp;gt;&lt;/span&gt;putBucket&lt;span style=&quot;color: purple;&quot;&gt;(&lt;/span&gt;&quot;&lt;span style=&quot;color: #cc0000;&quot;&gt;yourbucket&lt;/span&gt;&quot;, S3::ACL_PUBLIC_READ&lt;span style=&quot;color: purple;&quot;&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;4. Only Change these avobe red highlighted words and your task is complete.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;5. For uploading change in following code.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt; &amp;nbsp;&amp;nbsp;if(isset($_POST[&#39;Submit&#39;])){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: blue; white-space: pre;&quot;&gt;                     &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;$fileName = $_FILES[&#39;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;filenamechange&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&#39;][&#39;name&#39;];&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                     &lt;/span&gt;$fileTempName = $_FILES[&#39;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: red;&quot;&gt;filenamechange&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&#39;][&#39;tmp_name&#39;];&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: blue; white-space: pre;&quot;&gt;                     &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;$s3-&amp;gt;putBucket(&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;yourbucket&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;, S3::ACL_PUBLIC_READ);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                     &lt;/span&gt;if ($s3-&amp;gt;putObjectFile($fileTempName, &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: red;&quot;&gt;yourbucket&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;, $fileName, S3::ACL_PUBLIC_READ)) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                              &lt;/span&gt;echo &quot;&amp;lt;strong&amp;gt;We successfully uploaded your file.&amp;lt;/strong&amp;gt;&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                    &lt;/span&gt;}else{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                              &lt;/span&gt;echo &quot;&amp;lt;strong&amp;gt;Something went wrong while uploading your file... sorry.&amp;lt;/strong&amp;gt;&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                    &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;             &lt;/span&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;6. Retrieve data from following code.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;$contents = $s3-&amp;gt;getBucket(&quot;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;yourbucket&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;foreach ($contents as $file){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;                      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;$fname = $file[&#39;name&#39;];&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $furl = &quot;http://yourbucket.s3.amazonaws.com/&quot;.$fname;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                    &lt;/span&gt;&amp;nbsp;echo &quot;&amp;lt;a href=\&quot;$furl\&quot;&amp;gt;$fname&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;This is the way implementing amazon S3 services. Remember only you need to amazon S3 Access and Secret keys.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://apiphp.blogspot.com/feeds/5848150378908796149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://apiphp.blogspot.com/2011/11/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8433993357782127652/posts/default/5848150378908796149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8433993357782127652/posts/default/5848150378908796149'/><link rel='alternate' type='text/html' href='http://apiphp.blogspot.com/2011/11/blog-post.html' title='Amazon S3 (Simple Storage Services)'/><author><name>Anil Kumar</name><uri>http://www.blogger.com/profile/04198191208103967911</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkfEyGmIxO-GurRNPI3VzNbr21aBlSAaqj7YI-5LGGpOBvzDsslsFISTg-JL0ZmK7begAlKSPIE4z8S8AJAz3RCK7ifUZNSmdQa464mqMS3iNwIwISoVAB6lWykBc79lY/s220/14082011148.jpg'/></author><thr:total>0</thr:total></entry></feed>