<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Georgi Mitev &#124; Learn Scripts Tutorials &#124; PHP Cron Mysql Flash &#187; Web Developing</title>
	<atom:link href="http://georgi-mitev.com/category/web-develop/feed/" rel="self" type="application/rss+xml" />
	<link>http://georgi-mitev.com</link>
	<description>Georgi Mitev&#039;s blog for scripts tutorials and something else</description>
	<lastBuildDate>Thu, 29 Apr 2010 09:00:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Full backup of website’s mysql database using cron job</title>
		<link>http://georgi-mitev.com/2010/04/29/full-backup-mysql-database-db-using-cron-job/</link>
		<comments>http://georgi-mitev.com/2010/04/29/full-backup-mysql-database-db-using-cron-job/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 09:00:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Web Developing]]></category>

		<guid isPermaLink="false">http://georgi-mitev.com/?p=226</guid>
		<description><![CDATA[The MySql database backup website backup is very similar to the previous backup that I showed you 2 days ago. We are going to create a php file that is going to dump our database into filename with the current date and time.
Ok so let’s get going:
1.	Create the file “backup_database.php” and input the following code [...]]]></description>
			<content:encoded><![CDATA[<p>The MySql database backup website backup is very similar to the previous backup that I showed you 2 days ago. We are going to create a php file that is going to dump our database into filename with the current date and time.</p>
<p>Ok so let’s get going:<br />
<strong>1.	Create the file “backup_database.php” and input the following code into it:</strong><br />
&lt;?php exec(&#8216;cd /home/your_user/backup/db/;mysqldump &#8211;add-drop-table -h localhost &#8211;user=your_user &#8211;password=your_pass database_name &gt; `date +%y-%m-%d_%H-%M`.sql&#8217;); ?&gt;</p>
<p>Sometimes the path to your home dir looks different than ‘/home/your_user/’, so execute the ‘pwd’ command like explained in <a href="http://georgi-mitev.com/2010/04/26/schedule-website-file-system-backup-php-cron-job/#more-215">my previous post</a></p>
<p>Here we use the command mysqldump in a tutorial that I wrote previously about the dumping the sql database from one host to another. Now the database will be saved directly on the server that is hosting your website</p>
<p><span id="more-226"></span></p>
<p><strong>2. Create /backup/ and /backup/db/ directories via SSH or  FTP if not created.</strong></p>
<p>Of course you can use any names. But better<strong> do not </strong>create the /backup/ directory in the /public_html/ directory for security reasons <img src='http://georgi-mitev.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><strong>3. Upload </strong><strong>“backup_database.php” to the /home/your_user/backup  directtory<br />
</strong></p>
<p>If you upload backup_database.php to www.yoursite.com/backup_database.php by accessing it directly in your browser you will create a backup of your database.  However I do not recommend doing this <img src='http://georgi-mitev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  First because someone can overload your space quota by accessing the backup_database.php many times and second because you probably don’t want to enter the URL in your browser every time you want to perform database backup.</p>
<p><strong>4.	Go to CPanel -&gt; Cron Jobs and input the path to backup_database.php:</strong></p>
<p><img src="http://georgi-mitev.com/images/posts/4.2010/bdb1.jpg" alt="Cron Job DataBase backup" /><br />
Click on the `Add new Cron Job` button…     and you are pimped out. In my case I added the option this cron job to be executed twice a day. In case you database is updated more often/rarely you can modify this setting to suit your needs.<br />
You can also add option to save the dump of the database in tar format to save some space in your hdd quota by changing the script a bit.<br />
Full database backup in tar format (save more space):<br />
backup_database.php:<br />
<strong>&amp;lt;?php exec(&#8216;FILE=`date +%y-%m-%d_%H-%M`;cd /home/ps3igri/backup/db/;mysqldump &#8211;add-drop-table -h localhost &#8211;user=your_mysql_user &#8211;password=your_pass db_name &gt; $FILE.sql;tar czpf $FILE.tar $FILE.sql;rm -f $FILE.sql&#8217;); ?&gt;</strong><br />
As you see here we use the ‘FILE’ variable to store information about the filename. We create a SQL Dump, then we archive it, and after that we delete the original file to save some disk space.<br />
Good luck with the backup and see you next time <img src='http://georgi-mitev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://georgi-mitev.com/2010/04/29/full-backup-mysql-database-db-using-cron-job/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Website file system backup using php and cron job</title>
		<link>http://georgi-mitev.com/2010/04/26/schedule-website-file-system-backup-php-cron-job/</link>
		<comments>http://georgi-mitev.com/2010/04/26/schedule-website-file-system-backup-php-cron-job/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 14:00:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Developing]]></category>
		<category><![CDATA[backup cron job]]></category>
		<category><![CDATA[backup filesystem]]></category>
		<category><![CDATA[cpanel cron job]]></category>
		<category><![CDATA[execute backup]]></category>
		<category><![CDATA[php file system backup]]></category>
		<category><![CDATA[schedule backup]]></category>

		<guid isPermaLink="false">http://georgi-mitev.com/?p=215</guid>
		<description><![CDATA[Hello guys and ladies,
Long time no see  . Today I&#8217;m going to show you how to make a php script to perform full website backup the script can be executed via http request or via ssh shell or like a cron job .
We all know about the most standard way to add backup for [...]]]></description>
			<content:encoded><![CDATA[<p>Hello guys and ladies,<br />
Long time no see <img src='http://georgi-mitev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . Today I&#8217;m going to show you how to make a php script to perform full website backup the script can be executed via http request or via ssh shell or like a cron job .<br />
We all know about the most standard way to add backup for your website maintenance for example using  the Cron Jobs in the CPanel. If you already don’t know this – if your hosting provider does support CPanel you should be able to access it via this URL:  www.yourwebsite.com/cpanel<br />
<img src="http://georgi-mitev.com/images/posts/4.2010/bf1.jpg" alt="Cron Job CPanel" /><br />
<span id="more-215"></span><br />
After you login into you CPanel and choose ‘Cron jobs’  you can enter there manually script to fully backup your database or file system. For example a script for full file system backup should look like this:<br />
tar -cvpzf my_backup_file.tar /home/your_user/public_html<br />
we could make the script more interesting when instead of ‘my_backup_file’ we include the date and time in the filename:<br />
<strong>tar -cvpzf `date +%y-%m-%d_%H-%M`.tar /home/ your_user/public_html</strong><br />
of course you should change `/home/your_user/public_html` to whatever your home directory is. You can find out what your home directory is by executing ‘pwd’ (print working directory) in the ssh shell or creating the file `exec.php` with the code:<br />
<strong>&lt;?php echo exec(‘pwd’); ?&gt;</strong></p>
<p>and after that executing the code by opening http://www.yoursite.com/exec.php in your browser.<br />
So we can add this line directly into the Curl command field:<br />
<img src="http://georgi-mitev.com/images/posts/4.2010/bf2.jpg" alt="Cron Job CPanel Command field" /><br />
But now I am going to tell you better way to do it, because very often the commands directly typed at the cron’s `Command:` field are ignored because of some stupid quote convention etc.<br />
Full website filesystem backup using php file and cron job:<br />
1.	First we are going to create the file backup_filesystem.php and put this code into it :<br />
<strong>&lt;?php echo exec(&#8216;cd /home/your_user/backup/files;tar -cvpzf `date +%y-%m-%d_%H-%M`.tar /home/ your_user /public_html&#8217;); ?></strong></p>
<p>2.	After that we’ll access the website via the FTP and put the backup_filesystem.php file into the /home/your _user/backup/.  Make sure that you create “backup” and “backup/files” directories  if they are not already created. Better don’t put backup_filesystem.php file into the /public_html/ folder because we don’t want the users to have direct access to the file.</p>
<p>3.	Now we are going back to the CPanel -&gt; Cron Jobs. On the common settings we enter Once a day (so the Command will be executed once a day)  and on the Command field we enter:<br />
php ‘the path to backup_filesystem.php’<br />
<img src="http://georgi-mitev.com/images/posts/4.2010/bf3.jpg" alt="Cron Job CPanel enter Command " /><br />
After that click on the ‘Add new cron job’ button and Voila !! – the Cron Job for backup of your database is ready.<br />
The archive is created using low tar compression, so if needed you can archive your site using stronger bzip2 compression by replacing: “tar –cvpzf filename.tar” with “tar –cjf tarname.bz2”.<br />
<img src="http://georgi-mitev.com/images/posts/4.2010/bf4.jpg" alt="Cron Job CPanel enter Command" /><br />
The full backup of your website is created in the /backup/files directory and can be downloaded via FTP if necessarily – as you see the filename include the date and time of the moment it has been created, so it won’t be hard for you to guess which is the latest version of the backup if needed.<br />
Thank you for your time, next time I’m going to show you how to perform similar backup, but this time full database backup instead of filesystem backup.<br />
Cheers <img src='http://georgi-mitev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://georgi-mitev.com/2010/04/26/schedule-website-file-system-backup-php-cron-job/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Get your freak on with SSL and Apache :P</title>
		<link>http://georgi-mitev.com/2009/03/08/38/</link>
		<comments>http://georgi-mitev.com/2009/03/08/38/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 20:14:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Developing]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[open ssl]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[xampp]]></category>

		<guid isPermaLink="false">http://georgi-mitev.com/?p=38</guid>
		<description><![CDATA[for everybody who is just starting to learn about the SSL оpportunities that you have with Open SSL (tool) and the mod_ssl for Apache for securing your site. The simplest and fastest thing that you can do is to create a self-signed certificate, after you generate a free RSA key  . Don&#8217;t worry it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>for everybody who is just starting to learn about the SSL оpportunities that you have with Open SSL (tool) and the mod_ssl for Apache for securing your site. The simplest and fastest thing that you can do is to create a self-signed certificate, after you generate a free RSA key <img src='http://georgi-mitev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . Don&#8217;t worry it&#8217;s not so sophisticated as it sounds <img src='http://georgi-mitev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  actually it&#8217;s pretty easy. You can read more on the link below<br />
<a rel="lightbox" href="http://georgi-mitev.com/images/posts/3.2009/ssl.jpg"><img src="http://georgi-mitev.com/images/posts/3.2009/ssl.jpg" alt="ssl graph" width="60%" height="60%" /></a></p>
<p>Securing an Apache 2 Web server can be an intimidating prospect for those new to secure sockets layer (SSL) certificates. However, this need not be the case. SSL secures Web server to Web browser connections. Read on to better understand SSL certificates, learn how to set them up on Apache and launch your SSL-enabled site.</p>
<p><span id="more-38"></span>basically i will save you some of reading the long tutorial and will get straight to the point &#8211; here are some useful commands that you are going to learn from this tutorial. I had some problem with these commands under windows so i give you my updated version &#8211; everything should be ok here <img src='http://georgi-mitev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>i tested that with win7 and xampp 1.7 <img src='http://georgi-mitev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>create RSA private key<br />
openssl genrsa -out mykey.pem 1024</p>
<p>create self-signed certificate<br />
openssl req -config &#8220;xammp-dir\apache\bin\openssl.cnf&#8221; -new -key my.key -x509 -out sslname.crt</p>
<p>create certificate signing request<br />
openssl req -new -key my.key -config &#8220;xammp-dir\apache\bin\openssl.cnf&#8221; -out my.csr</p>
<p>&lt;IfDefine HAVE_SSL&gt;</p>
<p>&lt;VirtualHost 10.0.0.5:443&gt;<br />
DocumentRoot /home/sites/domainname.com/html<br />
ServerName www.domainname.com<br />
ServerAlias domainname.com<br />
ServerAdmin admin@domainname.com<br />
ErrorLog /home/sites/domainname.com/logs/error_log<br />
TransferLog / home/sites/domainname.com/logs/access_log<br />
SSLEngine on<br />
SSLCertificateFile /etc/httpd/conf/ssl.crt/domainname.com.crt<br />
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/domainname.com.key<br />
SetEnvIf User-Agent &#8220;.*MSIE.*&#8221; nokeepalive ssl-unclean-shutdown<br />
&lt;/VirtualHost&gt;</p>
<p>&lt;/IfDefine&gt;</p>
<p>you can read more here:<br />
<a href="http://www.sitepoint.com/article/securing-apache-2-server-ssl/">http://www.sitepoint.com/article/securing-apache-2-server-ssl/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://georgi-mitev.com/2009/03/08/38/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>50 Excellent AJAX Tutorials</title>
		<link>http://georgi-mitev.com/2008/11/22/50-excellent-ajax-tutorials/</link>
		<comments>http://georgi-mitev.com/2008/11/22/50-excellent-ajax-tutorials/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 19:33:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Developing]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[Javascript CSS XHTML]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://georgi-mitev.com/?p=10</guid>
		<description><![CDATA[
http://www.smashingmagazine.com/2007/01/26/tutorials-round-up-ajax-css-javascript-php-mysql-and-more/
AJAX provides Web developers with plenty of opportunities to enhance the user experience and improve the performance of their websites. There are countless ways that AJAX can be used, and fortunately there are plenty of good and useful AJAX tutorials out there to help you with your own implementation.
This post serves as a collection of [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="lightbox" href="http://andreasviklund.com/images/blog/2006-01-05-ajax-irl.jpg"><img src="http://andreasviklund.com/images/blog/2006-01-05-ajax-irl.jpg" alt="#" width="30%" height="30%" /></a></p>
<p><strong><a href="http://www.smashingmagazine.com/2007/01/26/tutorials-round-up-ajax-css-javascript-php-mysql-and-more/">http://www.smashingmagazine.com/2007/01/26/tutorials-round-up-ajax-css-javascript-php-mysql-and-more/</a></strong><br />
AJAX provides Web developers with plenty of opportunities to enhance the user experience and improve the performance of their websites. There are countless ways that AJAX can be used, and fortunately there are plenty of good and useful AJAX tutorials out there to help you with your own implementation.</p>
<p>This post serves as a collection of useful tutorials on working with AJAX in a wide variety of ways. You’ll find tutorials on working with forms, building shopping carts, creating chat features, working with log-ins and usernames and much more.</p>
<p><a href="http://www.smashingmagazine.com/2008/10/16/50-excellent-ajax-tutorials/"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://georgi-mitev.com/2008/11/22/50-excellent-ajax-tutorials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
