IMMORTALIZE YOUR PET

We want to permanently include your favorite pet picture in [The Blog Gallery]. It is quite a simple task:

1) Upload your pet picture using the script below

2) Send us with an email with the following information to gallery@PetLvr.com

* The filename of the picture you have uploaded
* Basic information about your pet .. name, breed, age, location, etc
* If you write a short story or explaining why your pet is the “BEST PET IN THE WORLD” .. as well as your name, website, etc .. we will publish it on our front page too!

3) Please do not bypass this script and email me your picture directly as an attachment to your email. The picture will be deleted from our server. If you are experiencing problems, please email us at
gallery (at) PetLvr (dot) com

4) * PLEASE NOTE …………

(a) English Filenames only – if I can’t read the name of the filename – it will be deleted
(b) Filenames under 10 characters – if there is more than 10 characters – it will be deleted
(c) I mean it – with items (a) and (b) ….

(sorry everybody .. I do not like the spam I have been receiving by a handful abusing this option)

Thank-You
HART / PetLvr.com


<?php
/*
Image Upload Script
Version: 1.5 with File Size Checking
Created: 23/1/2005
© 2005 PlasticRain and aTech Media.
http://www.plasticrain.com
http://www.atechmedia.com

If you use this script you should include a link back to our website
with the link http://www.plasticrain.com to allow other users to benefit.

This page is designed to be inlcluded within another page therefore html, head
and body tags have not been used. You can include this page into another page by
following the instructions in README.

If you have any problems with this script please post a message in our message
boards at http://www.plasticrain.com/forums/

*/

// CONFIG
$serverpath = "//home/petlvr/public_html/blog/photos/awaiting_review"; // Path to where images should be uploaded to on the server.
$urltoimages = "http://www.PetLvr.com/blog/photos/awaiting_review"; // Web address to where the images are accessible from.
$maxsize = "2000000"; // Example – 20000 is the same as 20kb
// CONFIG END

$mode = $_GET['mode'];
if ($mode == "") { $mode = "form"; }

if ($mode == "form") {
echo "

\n”;
echo “\n”;
echo “\n”;
}

if ($mode == “upload”) {
$file = $_FILES[‘file’][‘name’];
// If you add your own file types don’t forget to add an uppercase version.
$allowedfiles[] = “gif”;
$allowedfiles[] = “jpg”;
$allowedfiles[] = “jpeg”;
$allowedfiles[] = “png”;
$allowedfiles[] = “GIF”;
$allowedfiles[] = “JPG”;
$allowedfiles[] = “JPEG”;
$allowedfiles[] = “PNG”;

if($_FILES[‘file’][‘size’] > $maxsize)
{
print “File size is too big – please reduce file size and try again.”;
}
else {
$path = “$serverpath/$file”;
foreach($allowedfiles as $allowedfile) {

if ($done “yes”) {
if (file_exists($path)) {
echo “A file with this name already exists – please rename the file and reupload.”;
exit;
}
}

if (substr($file, -3) == $allowedfile) {
move_uploaded_file($_FILES[‘file’][‘tmp_name’], “$path”);
$done = “yes”;
echo “

Your image has been successfully uploaded to our server and can be accessed using the URL provided below.

“;
echo “

$urltoimages/$file

“;
echo “

“;
}

}

if ($done “yes”) { print “

Error: Your image as not been uploaded because it is not a recognized image file. Please try again.

“; }
}
}
echo “

PLEASE send … gallery (at) PetLvr (dot) com … an email to advise if there is a particular folder you would like this picture
to appear in … otherwise .. Thank-You for contributing to PetLvr.com – [The Blog Gallery] !!

?>


* NOTE: by submitting your photo to PetLvr.com .. you are agreeing to the stipulation that your photo may be used in any manner we deem appropriate for promoting PetLvr.com within the PetLvr.com website and in our Photo Gallery .. without compensation. Click the submit button below or move your mouse to append the filename you selected and hit ENTER button