Tensor is a sleek template that can fit many different websites. It can have a…
Shopping/Ecommerce Plugin Solutions For WordPress
Here is a list of Shopping/Ecommerce Plugin Solutions For WordPress. I thought i would start this post purely because i spent most of the day trying to find a ecommerce plugin that actually works. So hopefully it helps you too! Jigoshop Jigoshop is an eCommerce plugin for WordPress developed by...
06
Jul
2011
1 Comment
Read More
Good SEO practices – How to beat Google panda
Last week we did a post on Google panda “Has your site been Google Panda slapped?”. This week I want to share with you some ideas and practice that you can apply to your website to help improve and beat the panda! Google has released Panda update 2.2, just as...
27
Jun
2011
No comments
Read More
Sliding login panel with jQuery
Came across this great script for slide down login This script is based on a previous script “Show/Hide Login Panel with Mootools 1.2″ but now works with jQuery 1.3.2 instead of Mootools 1.2. Please note the Login and Register forms in this demo will not work “out of the box”...
22
Feb
2011
No comments
Read More
YouTube Clone Script
http://www.clipsharetemplates.com clone script allows you to run your own video sharing portal like YouTube.com, Metacafe, DailyMotion, and others The ClearWater template is a stunning and light design featuring stylish mouseover effects and will be a great addition to any video sharing website using Clipshare 4.1 Professional. The Clearwatter template utilizes...
10
Oct
2010
1 Comment
Read More
PHP Coupon Clone Script
Easy-to-use SEO friendly coupon script which allow you to create Discounts/Promotion Coupons web site. Earn affiliate commissions while offering discounts for your visitors! With 9 different designs you will be able to create perfect coupon web site in any niche! Add website/store with Seo title, keywords and affiliate url Activate...
23
Sep
2010
No comments
Read More
Image Sharing Script
Create your own popular image sharing website. Allow users to share their picture and photos with everyone. Host images instantly with this image hosting script. Features Rate Images Users can rate images with the 5 star rating system (ajax). Rate Images Security Users are only allowed to vote once per...
14
Jul
2010
1 Comment
Read More
Yahoo answers clone scriptYahoo answers clone script
Looking to create your own Yahoo Answer Website. Well here is the script that will help you achieve that goal! Question Answer Script with a large and highly customizable set of key features makes it the best of php answer script available. Question answer script has the question & answer...
30
May
2010
No comments
Read More
Domain Auctions Script Flippa clone script
This fantastic script can be used to create your very own Flippa website. Not only can it be used as a flippa type website, but it’s great for any marketplace niche. With this Clone Script you will be able to produce a marketplace website within minutes. PRICE: $57 DEMO...
29
May
2010
2 Comments
Read More
This specific post was one that I decided to do, only because I thought I would never use it. This specific tool worked out great and allows users to have there SQL databases emailed to them. Now you are wondering why would somebody use this. Well it’s simple. I needed this specific tool only to back up certain tables in my SQL database, so that the results could be used in a CSV format and then reloaded on a C++ platform. Without me having to do it manually ever time.
So in short the sql is emailed then piped to a written program allowing a up-to-date version of members from the live site. Sounds pretty neat….
( Please note I changed the code slightly to work for me, but posted the original version. )
Here’s the code:
< ?php
/*
Quickly and easily backup your MySQL database and have the tgz emailed to you. You need PEAR installed with the Mail and Mail_Mime packages installed. Read more about PEAR here: http://pear.php.net. This will work in any *nix enviornment. Make sure you have write access to your /tmp directory.
*/
require_once('Mail.php');
require_once('Mail/mime.php');
// mysql & minor details..
$tmpDir = "/tmp/";
$user = "root";
$password = "pass";
$dbName = "db";
$prefix = "db_";
// email settings...
$to = "someone@gmail.com";
$from = "another@gmail.com";
$subject = "db - backup";
$sqlFile = $tmpDir.$prefix.date('Y_m_d').".sql";
$attachment = $tmpDir.$prefix.date('Y_m_d').".tgz";
$creatBackup = "mysqldump -u ".$user." --password=".$password." ".$dbName." > ".$sqlFile;
$createZip = "tar cvzf $attachment $sqlFile";
exec($creatBackup);
exec($createZip);
$headers = array('From' => $from, 'Subject' => $subject);
$textMessage = $attachment;
$htmlMessage = "";
$mime = new Mail_Mime("\n");
$mime->setTxtBody($textMessage);
$mime->setHtmlBody($htmlMessage);
$mime->addAttachment($attachment, 'text/plain');
$body = $mime->get();
$hdrs = $mime->headers($headers);
$mail = &Mail::factory('mail');
$mail->send($to, $hdrs, $body);
unlink($sqlFile);
unlink($attachment);
?>
To download the script click here. (special thanks to sematopia.com )
