Maar goed, dit is het script waar ik momenteel gebruik van maak:
<?php
$target = "dev/images/";
$target = $target . basename( $_FILES['photo']['name']);
$title=$_POST['Title'];
$pic= basename ($_FILES['photo']['name']);
// Connects to the database
mysql_connect("localhost", "database", "password") or die(mysql_error());
mysql_select_db("database_database") or die(mysql_error()) ;
//Writes the information to the database
mysql_query("INSERT INTO images(Title, Link, Date, Filetype) VALUES ('$title', 'images/$pic', CURDATE(), 'afbeelding')");
mysql_query("INSERT INTO grabbelton(Link, Date) VALUES ('images/$pic', CURDATE())");
if($_FILES['photo']['type'] == "image/png" || $_FILES['photo']['type'] == "image/jpeg") {
//Writes the photo to the server
if(move_uploaded_file($_FILES['photo']['tmp_name'], $target))
{
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory! <br />";
echo $title . "<br />";
echo $pic;
}
else {
echo "Sorry, there was a problem uploading your file.";
}
}
else {
echo "unsupport file format!";
}
?>
De bedoeling is dat er een script wordt geschreven voor ons dat de bovenstaande handelingen verricht en tegelijk de afbeelding watermerkt.
Prijs weet ik nog niet. Wanneer u interesse heeft raad ik aan om een prijsindicatie te geven om misverstanden te voorkomen.