I used to use a script to change the text on an image via update form.
It worked perfectly at first while I was on a shared host with all modules pre-installed.
I moved to a vps where I had to install everything myself and now the script no longer works.
The php page is able to be displayed but when I update, the text does not show up like it used to.
Here is an example of the page on the shared host that still works: http://nyanpuffle.com/auntarctic/ Password is 1234
Here is an example of the page on the vps that does not work: http://www.clubpenguincheatsy.com/cptrackers/auntarctic/ Password is 1234
Here is a copy of the coding used:
<TITLE>Tracker</TITLE>
<body bgcolor="#4b7bb2">
<font face="arial">
<center>
<?php
$submit = $_POST['submit']; // Gets If It has been Submitted
if($submit){ // If submitted do this.
$password = $_POST['password']; // Get the password they submitted
$status = $_POST['status']; // Get the status they submitted
$server = $_POST['server']; // Get the server they submitted
$room = $_POST['room']; // Get the room they submitted
//Now We Secure it.
if($password == "1234"){
//Now We Generate the image and stuff.
$im = imagecreatefrompng("in.png");
// Make RGB Colour For Writing
$colour = imagecolorallocate($im, 255, 255, 255); // I want mine in red(This is black). So I am just
//Gonna find out the rgb code
$font = 'BurbankBigRegular-Bold.ttf'; //
//This ^ Is our font, It has to be the exact name and in the right folder.
//Draw Text
imagettftext($im, 20, 0, 100, 68, $colour, $font, $status);
imagettftext($im, 20, 0, 95, 95, $colour, $font, $server);
imagettftext($im, 20, 0, 85, 127, $colour, $font, $room);
//Create Image
imagepng($im,'out.png');
// Destroy - Save Server Resources
imagedestroy($im);
echo "<b> Updated! </b>";
}else
{
echo "<p><b>Incorrect Password!</b></p>";
}
}
//This form remebers what they put, so they dont have to keep typing it in.
// $_SERVER['PHP_SELF'] Means Get this document to submit to.
// If you know html this will be familiar.
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" />
<p>Password: <input type="password" name="password" id="password" value="<?php echo $_POST['password']; ?>"/></p>
<p>Status: <select name="status"> <option value="">Select...</option>
<option value="Online"> Online</option>
<option value="Offline"> Offline</option>
<option value="Tracking..."> Tracking</option>
</select>
</p>
<p>Server: <input type="text" id="server" name="server" value="<?php echo $_POST['server']; ?>"/></p>
<p>Room: <input type="text" id="room" name="room" value="<?php echo $_POST['room']; ?>"/></p>
<p><input type="submit" id="submit" name="submit"/></p>
</form>
<p>Tracker:</p>
<p><img src="out.png" alt="Tracker" /></P>
<a href="http://ClubPenguincheatsy.com/cptrackers"s>Back to Tracker Dashbaord</a>
</center>
The VPS is ran on Ubuntu and I have PHP,MYSQL, and Apache installed.