create sub buckets on amazon s3

Sub buckets is very tricky task to create on Amazon S3 service… <?php include(“S3.php”); // class for REST based S3 manager $s3 = new S3(‘accessKey’, ‘secretKey’); $s3->putBucket(‘bucketname’, S3::ACL_PUBLIC_READ); /* function to upload svnlabs.txt file to subfolders s/v/n/l/a/b/s on S3 bucketname */ $s3->putObjectFile(‘svnlabs.txt’, ‘bucketname’, ‘s/v/n/l/a/b/s/svnlabs.txt’, S3::ACL_PUBLIC_READ); /* function to delete svnlabs.txt file to subfolders s/v/n/l/a/b/s on … Read more

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

amcharts – dynamic data generated with PHP

AmCharts is a set of Flash charts for your websites and Web-based products. AmCharts can extract data from simple CSV or XML files, or they can read dynamic data generated with PHP, .NET, Java, Ruby on Rails, Perl, ColdFusion, and many other programming languages. Source: JavaScript Charts & Maps Download amCharts 4 Help: http://www.appfire.com/appfire-flashcharts-plugin/FusionChartsFree/Contents/ChartSS/XML_Col2DLineDY.html

pdftohtml

pdftohtml converters  PDF documents into HTML format, which is more suitable for Internet publishing. The converter produces HTML documents with texts, pictures, graphics and bookmarks. pdftohtml software does not require Adobe Acrobat, or even Acrobat Reader. Install pdftohtml on Fedora/Linux: # yum install pdftohtml # which pdftohtml Usage: pdftohtml [Option] <PDF File> [<HTM File>] Source: … 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

Resume Builder pdf2txt, word2txt

Reading PDF Files XPDF package includes “pdftotext.” You have to install XPDF/pdftotext then run the following PHP statement to get the PDF text: $txtcontent = exec(‘/usr/local/bin/pdftotext svnlabs.pdf -‘); Reading DOC Files This package is called Antiword. Here’s the PHP code to grab the Word DOC content: $txtcontent = exec(‘/usr/local/bin/antiword svnlabs.doc’);

Publish HTML2PDF

HTMLDOC converts HTML files and web pages into HTML, PostScript and PDF files suitable for on-line viewing and printing. HTMLDOC is used for anything that needs to be viewed or printed including on-line billing, books, financial statements, automated network configuration guides, mailing lists and labels, marketing flyers, quarterly reports, technical manuals, and users manuals. We … Read more

Configure Amazon EC2

1.Boot 2 linux servers on EC2 2.Assign elastic IP to each of them 3.Register a domain (eg svnlabs.com) 4.On the domain settings – create 2 host records – ns1.svnlabs.com and ns2.svnlabs.com and point each record to each of the elastic IPs. 5.On your 2 nameserver instances – create dns zone for ns1. and ns2 respectively … Read more

Lab Tips

Database: 1. Delete all information from databse related to, if deleting user or any content from CMS. 2. Use PDO, ADO, Pear, Zend etc. library to connect to database. 3. Take regular backup for database. 4. Use better naming convension. Folders: 1. Use better naming convension. 2. Take regular backup for folders. 3. Protect project’s … Read more