Posts Tagged ‘PHP’

How to automated backups your database ?

Here is a php script that will create a compressed backup of your website files, creating a different file each day for a month (then start over) so you have 30 days of backups. It will email you with a backup confirmation. Run it every night using cron to kick it off. You should download [...]

PHP: Ban or allow IP Addresses

While a .htaccess file can be used to ban or allow, it cannot be selective by function. This is something you can easily do with a script. In these examples the IP Addresses are in a file called IP.dat (in the same directory as the script) with one address per line. These scripts can also [...]

Google PageRank status display on your page

What is Google PageRank?: PageRank is a numeric value that represents how important a page is on the web. It is Google’s way of measuring the importance of web site. Here is how Google explains PageRank: PageRank relies on the uniquely democratic nature of the web by using its vast link structure as an indicator [...]

PHP script clock for your website

Keep save as this code with filename.php <? // Binary Clock // script copyright© 2002 Andreas Tscharnuter // questions? contact: psychodad@psychodad.at || [url=http://www.psychodad.at/clock/]http://www.psychodad.at/clock/[/url] // free to use, copy and modify but leave comments untouched;) // just include this file where your binary clock should appear // version 1.2 03 September 2003 // below you can [...]

Dynamic Image / Signature Generator

The file need create: Code 1: dynamic_sig.php (you can rename this to index.php and you’ll see at the end why) Code 2: a simple text file named anything (I will call it name.txt). <?php header(“Content-type: image/png”); $image = imagecreatefrompng(“../path/sotw_background.png”); //imagecolorallocate($image, R, G, B) in HEX values $font_black = imagecolorallocate($image, 2, 1, 8); $font_blue = imagecolorallocate($image, [...]

PHP script: Watermark your images

When you want to publish a lot images, so you want to have copyright on images, what should you do for this solution. Now, i want to introduce the way to do that perfectly. Firstly, Open notepad, copy this code below, paste into watermark.php. <?php // this script creates a watermarked image from an image [...]

BAN IP with php script

This first script can be used to ban an IP Address from any function on your site. 1. Make a file name banner.w3 to add IP need to BAN 2. Copy this code below, Open Notepad paste this code into, save as your filename as index.php. <?php $ip = $_SERVER['REMOTE_ADDR']; $ipArray = preg_replace(“#\r\n?|\n#”,””,file(‘banner.w3‘)); foreach ($ipArray [...]

Auto add Watermark on your images

Hi, Everybody here ! The best way to protect your images is to watermark them. But that can be a real hassle. This script will take any image and automatically add a watermark before it is delivered from the server to the person’s browser. The instructions for using this script are in the comment lines [...]

How to create contact page with PHP

To view the contact nquan of a member of the Web site can not be flippant contact (Feed-back). I would like to introduce messages by MCR with PHP basic. 1. First you create a file contact.php content: <form method=”post” action=”send.php”> <input TYPE=”TEXT” value=” you@domainname.com” NAME=”email” size=20> <br> <input TYPE=”TEXT” value=”Title mail” NAME=”subject” size=20> <br> <TEXTAREA [...]

Auto watermark all images for WordPress

How many of you have wanted to have a watermark on all of your images? Lets say you are just starting your blog and you will just fire up Adobe Photoshop or any other image editing program and you will add a watermark on each image you have. It is time consuming but it will [...]