Backup Amazon S3 with PHP

This is the source code to backup/download Amazon S3 Bucket’s multimedia files to other server by PHP… here $bucketurl is XML url of Amazon S3 bucket with full ACL. $folder is path of the server where S3 files to store. This script will download all files in Amazon bucket to other server Php-Code:  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  <?php … Read more

Decrypt \x3d

How to decrypt string html like below: <br /> [“/imgres?imgurl\x3dhttp://crshare.com/wp-content/uploads/auto_save_image/2009/01/232021vkV.jpg\x26imgrefurl\x3dhttp://crshare.com/tag/joomla-templates/\x26usg\x3d__2r0BoANxQQ1IhXj0-dAyU-HVVYI\x3d\x26h\x3d350\x26w\x3d500\x26sz\x3d30\x26hl\x3den\x26start\x3d81\x26sig2\x3d1MTsUlM1eoJ_j8K6hvLdRQ\x26um\x3d1″,””,”c8m2Qp_jYzo4UM:”,”http://crshare.com/wp-content/uploads/auto_save_image/2009/01/232021vkV.jpg”,”130″,”91″,”Although the \x3cb\x3eJoomla\x3c/b\x3e community”,””,””,”500 x 350 – 30k”,”jpg”,”crshare.com”,””,””,”http://tbn2.google.com/images”,”1″,[],””]<br /> $html=html_entity_decode(urldecode(str_replace(‘\x’, ‘%’, $html)),ENT_QUOTES, “UTF-8”); MP3 file download link $mp3_dlink = preg_replace(‘/ /i’, ‘%20’, $mp3_link);

Get popup center

function get_popup_center(popurl) { var top = (screen.availHeight/2)-61; var left = (screen.availWidth/2)-150; var width = 300; var height = 150; //var popurl = ‘https://www.svnlabs.com’; var oWin = popUp(popurl, top, left, width, height); } function popUp(URL, top, left, width, height) { day = new Date(); id = day.getTime(); eval(“page” + id + ” = window.open(‘”+URL+”‘, ‘” + … Read more

focus password element from password to ********

/** *  <form> *  <input type=”text” name=”password” value=”Password” onfocus=”get_password_focus(this)”> *  </form> *  This function can be used for focus password element from password to ******** */ function password_focus(obj) { var newO=document.createElement(‘input’); newO.setAttribute(‘type’,’password’); newO.setAttribute(‘name’,obj.getAttribute(‘name’)); obj.parentNode.replaceChild(newO,obj); newO.focus(); }

Get page size

function get_page_size() { var de = document.documentElement; var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; arrayPageSize = new Array(w,h); return arrayPageSize; }

Change Images

/* change image on mouseover and click */ function mEvent(id,img1,img2,img3) { var i = new String(); i = document.images[id].src; document.images[id].src = i.replace(img2,img1); //for click condition if(document.images[id].src.indexOf(img3)!=-1) document.images[id].src = i.replace(img3,img1); }

Protect website folders by .htaccess

<IfModule dir_module> DirectoryIndex index.html index.php index.php4 index.php3 index.cgi index.pl index.htm index.shtml index.phtml </IfModule> <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / RewriteCond %{REQUEST_URI} !(css) RewriteCond %{REQUEST_URI} !(js) RewriteCond %{REQUEST_URI} !(images) RewriteCond %{REQUEST_URI} !(videos) RewriteCond %{REQUEST_URI} !(cache) </IfModule>

Templates Search Made Easy

Suppose you want to search joomla/wordpress templates and find the site for all these templates, here you have to navigate entire templates with all pages. This will waste your time and internet band width…. www.bestofjoomla.com The best way to navigate all template in few seconds: This will save your time and band width….. Here on … Read more

pdftk – fedora – merge pdf files

Pdftk allows to manipulate PDF easily and freely. It does not require Acrobat, and it runs on Windows, Linux, Mac OS X, FreeBSD and Solaris etc. Features: Merge PDF Documents Split PDF Pages into a New Document Rotate PDF Pages or Documents Decrypt Input as Necessary (Password Required) Encrypt Output as Desired Fill PDF Forms with … Read more