I want to change this code, so i can upload a random image hosted by me from a list of images, to a user album by a facebook app instead of creat a image by GD.
What i need to do??
What i need to do??
Code:
$canvas = imagecreatefromjpeg ("bg.jpg"); // background image file
$black = imagecolorallocate( $canvas, 61, 61, 61 ); // The second colour - to be used for the text
$font = "font.ttf"; // Path to the font you are going to use // font size
imagettftext( $canvas, 15, -1, 51, 60, $black, $font, $name );
imagettftext( $canvas, 15, -1, 51, 200, $black, $font, $friend );
imagejpeg( $canvas, "img/".$fbid.".jpg", 50 );
ImageDestroy( $canvas );
header("Location: ".$scripturl."upload.php?id=".$fbid."&friends=".$friends."")
?>