Automating Amazon S3 Backup on Windows with CloudBerry S3 Backup
CloudBerry S3 Backup is a Windows application that automates backup and restore
processes to Amazon S3 secure cloud storage. CloudBerry S3
Backup provides a powerful Backup and Restore program designed
to leverage Amazon S3storage to make your disaster recovery plan simple,
reliable, and affordable.
Disaster recovery planning is often times an afterthought that comes to
light when disaster strikes.
Very seldom do companies fully recover from loss of critical data which could
lead to loss of business.

What is Amazon S3
To use CloudBerry S3 Backup you should create your Amazon S3 account. Amazon S3 is unlimited
secure internet storage that leverages Amazon infrastructure. Amazon S3 is
primarily designed for software developers who want to take advantage of
scalable internet storage in their applications. However, the products like
CloudBerry S3 Backup unleash the power of Amazon S3 and make it available for
less sophisticated consumers.
There are no sign-up or minimum fees. You only pay
for what you use. In many cases your monthly checks will be less than a dollar!
The costs start at $0.15 per GB of data storage a month and ONLY (!) $0.03 per
GB of data transfer until June, 30 2009. The data transfer costs will return
to the normal $0.1 per GB as of July, 1 2009. So hurry up to do the initial
backup!
Check here
for more info on Amazon S3 pricing.
With CloudBerry S3 Backup you can
- Setup your backup process in a couple of minutes
- Strong data encryption protects your data
from unauthorized access - Data compression allows you to lower your Amazon S3
storage and transfer costs - Scheduling capabilities automate the backup
process - Backups are available for recovery 24/7
- Intuitive interface provides easy file and folder
selection capabilities - No proprietary storage format. You can access your
files using other Amazon S3 tools. - Control bandwidth utilization to do other tasks
online when backup is running - Support multiple storage clouds in the future such
as Microsoft Azure, Sun Cloud Storage Service

This is a list of CloudBerry S3 Backup features.
- Easy installation and configuration
- Scheduling capabilities
- Data encryption
- Data retention schedule
- Secure online storage
- Backup verification
- Alerting notifications
- Indication for successful/failed backup status
- The ability to restore to a particular date
- Backup open files
- Bandwidth throttling
- Support SSL for secure data connection
- Minimize to tray
- Built-in feedback form
Conclusion
CloudBerry S3 Backup is a fully functional backup product that can help computer users ranging from private individuals to small and mid size business leverage Amazon S3 secure and reliable Cloud storage to automate data backup and restore processes. If you are considering using Amazon S3 for data backup purposes it is a good reason to start now and download CloudBerry S3 Backup from CloudBerry Lab website at http://cloudberrydrive.com/
Resize YouTube Embed Video
Here is the code how to resize youtube video embed code, even this code will work to non-youtube embed videos…..
<?php
$embed = '<object width="425" height="344"><param name="movie" value="http://www.youtube.com/ v/SOiGqFceMYo&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/SOiGqFceMYo&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>';
//$alt = preg_match_all('/(width|height)=("[^"]*")/i', $embed, $matches);
$embed = preg_replace('/(width)=("[^"]*")/i', 'width="200"', $embed);
$embed = preg_replace('/(height)=("[^"]*")/i', 'height="200"', $embed);
echo $embed;
?>
Now try to resize youtube player with php regular expression replace preg_replace()……
Javascript Event Log ~ Console
This is the javascript function used for tracking javascript events as in alert(). This may be replacement of alert() to better track the javascript events and error/success messages.
/*
Below is the function where to call console()
*/
window.document.onclick = function(){ console(window.event.target.onclick) };
function console(msg)
{
mywin = window.open('', 'console', 'width=500,height=150,left=800,top=800,scrollbars=yes,location=no');
if (mywin && msg!=null)
mywin.focus();
mywin.document.title='Javascript Console...';
//mywin.document.writeln('<h4>Javascript Log here..</h4>');
if(msg!=null)
mywin.document.writeln('<div style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; border-bottom: 1px dotted #FFB64A; padding:4px;">'+msg+'</div>');
//mywin.document.writeln("<br /><a href=\"javascript:void(0)\" onclick=\"this.document.write='';\" >Clear</a>");
//sleep(10); mywin.blur();
}
Managing Amazon S3 on Windows with CloudBerry Explorer freeware
CloudBerry Explorer is a freeware Windows Client for Amazon S3 and CloudFront services. CloudBerry Explorer makes managing files in Amazon S3 storage EASY. By providing an FTP client like user interface to Amazon S3 accounts, files, and buckets, CloudBerry lets you manage your files on cloud just as you would on your own local computer. And best of all it is absolutely free!
With CloudBerry Explorer you can
* Allow end users to accomplish simple tasks without special technical knowledge
* Automate time-consuming tasks to improve productivity
* With CloudBerry Explorer, Amazon S3 becomes an extension to your local storage. You are no longer limited to the classic data storage on your local drive(s). With CloudBerry Explorer, you can move files to Amazon S3 just as easily as managing them on your local drive(s).
* CloudBerry Explorer allows you to move large files such as photos, videos, and music to Amazon S3 and free up your local storage.
* The files on your Amazon S3 can be shared with anyone who has access to the internet. For security purposes, the S3 accounts can be password protected and access can be restricted
* Manage CloudFront distributions to publish content in multiple geographical zones
This is a long list of CloudBerry Explorer features
· Register and connect to any number of Amazon S3 accounts
· Work with any number of Amazon S3 accounts simultaneously
· Fast copy files between your S3 accounts
· Share buckets and files located on Amazon S3 with other users
· Create, browse, and delete S3 buckets
· Copy and move files between Amazon S3 and your local computer
· Set up file access permissions
· Automate common tasks with Microsoft PowerShell
· Generate external URLs
· Copy/Move in background
· Support for MD5 to ensure files are not corrupted while transferred to S3
· Copy files from Windows Explorer
· Support for Amazon CloudFront service
· Support for CNAMEs
· Support for time limited or signed URLs
· Apply ACL list to child objects (files inside a bucket)
· Remember user settings
· Rename objects in S3
· Support for Requester Pays Option for Amazon S3
· Support for streamincloud.com FLV encoder for Amazon S3
· Generate BiTorrent URLs
· Generate short URLs using http://chilp.it
· Hide to tray
· Built-in feedback form
Conclusion
CloudBerry Explorer is a solid Amazon S3 client that can help developers, web designers and other users who want to exploit Amazon S3 and CloudFront services. If you work with Amazon S3 on Windows or considering using Amazon S3 it is a good reason to start now and download CloudBerry Explorer from CloudBerry Lab website at http://cloudberrylab.com/
Get js css source of web page
These are some javascript functions which can be used for getting js, css files included on web page.
Also we can view source of these files……
function trim(s) {return s.replace(/^\s*\n/, '').replace(/\s*$/, ''); };
function add(h,b) {b.appendChild(h);}
function makeTag(t) {return document.createElement(t);}
function makeText(tag,text) {t=makeTag(tag); t.appendChild(document.createTextNode(text)); return t;}
function get_all_js(divid)
{
var s=document.getElementsByTagName('SCRIPT');
var d=window.document;
var b=document.getElementById(divid);
add(makeText('style', 'iframe{width:100%;height:18em;border:1px solid;'),b);
add(makeText('h3', d.title='Scripts in ' + location.href),b);
for(i=0; i<s.length; ++i) { if (s[i].src) { add(makeText('h4','script src="' + s[i].src + '"'),b);
iframe=makeTag('iframe'); iframe.src=s[i].src; add(iframe,b); } else { add(makeText('h4','Inline script'),b);
add(makeText('pre', trim(s[i].innerHTML)),b); } }
return b;
}
function get_all_css(divid)
{
var s=document.getElementsByTagName('LINK');
var s1=document.getElementsByTagName('STYLE');
var d=window.document;
var b=document.getElementById(divid);
add(makeText('style', 'iframe{width:100%;height:18em;border:1px solid;'),b);
add(makeText('h3', d.title='Styles in ' + location.href),b);
for(i=0; i<s.length; ++i) { if (s[i].href) { add(makeText('h4','style href="' + s[i].href + '"'),b);
iframe=makeTag('iframe'); iframe.src=s[i].href; add(iframe,b); } else { add(makeText('h4','Inline style'),b);
add(makeText('pre', trim(s[i].innerHTML)),b); } }
for(i=0; i<s1.length; ++i) { if (s1[i].href) { add(makeText('h4','style href="' + s1[i].href + '"'),b);
iframe=makeTag('iframe'); iframe.src=s1[i].href; add(iframe,b); } else { add(makeText('h4','Inline style'),b);
add(makeText('pre', trim(s1[i].innerHTML)),b); } }
return b;
}
function get_view_source(divid)
{
var s=document.getElementsByTagName('HTML');
var d=window.document;
var b=document.getElementById(divid);
add(makeText('style', 'iframe{width:100%;height:18em;border:1px solid;'),b);
add(makeText('h3', d.title='Source of ' + location.href),b);
for(i=0; i<s.length; ++i) { add(makeText('h4','View Source'),b);
add(makeText('pre', trim('<html>'+s[i].innerHTML+'<html>')),b); }
return b;
}
Web Browser in PHP
We can use PEAR (PHP Extension and Application Repository) for more real life application.
PEAR is a framework and distribution system for reusable PHP components.
D:\xampp\php\PEAR\Net\Curl.php
<?php
include_once("Net\Curl.php");
$c = new Net_Curl();
$c->Net_Curl([URL], $_SERVER['HTTP_USER_AGENT']);
echo $c->execute();
?>
This simple code spider the page as the other web browser do, even there is problems with Curl, Sockets etc.!
Install FFmpeg in Linux
FFmpeg is a computer program that can record, convert and stream digital audio and video in numerous formats
How we know linux type and version
cat /etc/redhat-release
yum install ffmpeg ffmpeg-devel
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
yum list glib*
yum install ffmpeg
yum install mplayer mencoder
yum install flvtool2
Source:
http://www.mysql-apache-php.com/ffmpeg-install.htm
http://albert.sacredsf.org/~nmcspadden/v_engine/Phoenix/Construction.html
Useful Linux Commands……
General Information
# cat /proc/version (Linux Version)
# cat /proc/meminfo (Memory Information)
Zip File/Folder in Linux
# zip -9 -r <zip file> <folder name>
# zip -9 <zip file> <filename>
Use “-9? for best compression. The compressed file works fine with Windows XP compression tool.
Execute Shell Script
# chmod x+ file.sh
# ./file.sh
System User
# useradd -d /var/www wwwuser
# passwd wwwuser
# userdel wwwuser
# userdel -r wwwuser
List loaded Modules
# lsmod
Extract here
# tar -xvzf latest.tar.gz -C ./(folder name)
# unzip file.zip
Upload site with zipped version
# zip -9 -r /var/www/html/html.zip /var/www/html
# wget http://75.101.199.175/html.zip
# unzip html.zip
# cd /root/var/www/html
# mv * /var/www
Create shortcuts in linux
# rm -rf /var/www/
# ln -sf /var/scalr/app/www /var/
# chmod a+rX -R /var/www
# ln -sf /var/log/apache2 /var/www/logs
Compute Load
# uptime (1,5,15 minute)
# w
# top
* CPU usage
* ‘uptime’ for load average
* ‘top’ for an overall system view
* ‘iostat’ for storage I/O statistics
* ‘netstat’ for network statistics
* ‘mpstat’ for CPU statistics
* ‘tload’ for display an ncurses graphic of the recent load
Linux Ports/processes
# netstat -an
# lsof -i
# nslookup www.*.com
# ps aux | grep mysqld
# netstat -an
# netstat -an | grep 3306
Updrage php 5.2.x
cd /etc/yum.repos.d
wget http://remi.collet.free.fr/rpms/remi-fedora.repo
yum –enablerepo=remi update mysql
yum –enablerepo=remi update php
apachectl restart
Others
# whereis file
# locate filename
# find / -name filename
# shutdown -r now (restart)
Speed up your web pages with YSlow
First download/install firefox add-ons Firebug and YSlow

1. Make Fewer HTTP Requests
Combined files are a way to reduce the number of HTTP requests.
CSS Sprites are the preferred method for reducing the number of image requests.
Image map combine multiple images into a single image.
2. Use a Content Delivery Network
Intermediary caching is cache between the browser and the server, so use CDN like facebook
fbcdn.com.
3. Add an Expires Header
For static components: implement “Never expire” policy by setting far future Expires header.
For dynamic components: use an appropriate Cache-Control header to help the browser with conditional.
Expires: how long the web content cacheable.
max-age: the browser will request the new content after the age limit.
<FilesMatch “\.(jpg|jpeg|png|gif|swf|css|js|ico|pdf)$”>
Header add “Expires” “Mon, 15 Nov 2020 00:00:00 GMT”
Header add “Cache-Control” “max-age=31536000″
</FilesMatch>
4. Gzip Components
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
5. Put CSS at the Top
6. Move Scripts to the Bottom
7. Avoid CSS Expressions
background-color: expression( (new Date()).getHours()%2 ? “#B8D4FF” : “#F08A00″ );
8. Make JavaScript and CSS External
9. Reduce DNS Lookups
10. Minify JavaScript
<IfModule mod_rewrite.c>
RewriteRule ^css/(.*\.css) combine.php?type=css&files=$1
RewriteRule ^js/(.*\.js) combine.php?type=js&files=$1
</IfModule>
11. Avoid Redirects
12. Remove Duplicate Scripts
13. Configure ETags
This is the unique identifier for comparing cached files.
<FilesMatch “\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt)$”>
FileETag none
</FilesMatch>
More page optimization techniques are here below:
http://developer.yahoo.com/performance/rules.html
Make Ajax Cacheable
Flush the Buffer Early
Use GET for AJAX Requests
Reduce the Number of DOM Elements
Split Components Across Domains
Minimize the Number of iframes
No 404s
Reduce Cookie Size
Use Cookie-free Domains for Components
Choose <link> over @import
Optimize Images
Don’t Scale Images in HTML
Make favicon.ico Small and Cacheable
Keep Components under 25K
http://www.leigeber.com/2008/04/introduction-to-web-caching/
We can use Server Caching for higher level of caching your PHP.
Comments (2)
Comments (5)
Leave a Comment