PHP HTML Email Sender
Tired of the same old boring text newsletter? Well send your next out in HTML using this PHP script.
The Code
<?
$theboundary = md5(uniqid(""));
$header = "From: \"$fromname\" <$fromemail>";
$header .= "\nMIME-Version: 1.0";
$header .= "\nContent-Type: multipart/alternative;";
$header .= "\n boundary=\"—-=_NextPart_$theboundary\"";
$header .= "\nX-Priority: 3";
$header .= "\nX-MSMail-Priority: Normal";
$htmlmessage = file_get_contents("htmlemail.html");
$textmessage = file_get_contents("htmlemail.txt");
$body = "This is [...]
Content is King
Search engines account for massive traffic on the internet today. If someone doesn’t know about an area of life, they can simply search and find it. To be on the receiving end of this traffic, you first need content.
The type of content you need depends on the type of website you are running. Take, for [...]
PHP Image Sizes
You might need the size of an image for many reasons – in this tutorial I’ll go over the simple task of getting this information.
The Code
<?
$info = getimagesize("image.gif");
$width = $info[0];
$height = $info[1];
$type = $info[2];
$attr = $info[3];
?>
The function getimagesize returns an array with 4 values. I’ve written the above example so you can clearly see which [...]
Uploading with PHP
There are all sorts of cool things you can do with a file upload script – upload banners for a banner rotator, upload avatars for a forum, upload zips for a download site, the list goes on.
You may not have realized it, but uploading in PHP is very easy. Here we’ll go over the two [...]
Tim Linden Announcements
You may have noticed the new front page for Tim Linden DOT COM. This is where all announcements will go, that need to be there for some time. You see the blog, the front page info goes away as I post. So previously, I wouldn’t post for a while after an announcment I wanted people [...]
PHP URL Rotator
With a URL Rotator you can advertise one URL, and spread the traffic over multiple sites. Or if you have a database of websites, you could make a “Random Site” link – a fun thing to use with blogs.
The Code
<?
$global_dbh = mysql_connect("localhost","username","password");
mysql_select_db("mydatabasename", $global_dbh);
$query = "SELECT * FROM `urls` ORDER BY `lasttime` ASC LIMIT 1";
$result = [...]





