s.php (688B)
1 <?php 2 if (isset($_GET['t']) && isset($_GET['c'])) { 3 $title = $_GET['t']; 4 $content = $_GET['c']; 5 $len = (strlen($title . $content)*9)+20; 6 $offset = (strlen($title)*9)+10; 7 8 // Set the content-type 9 header('Content-type: image/png'); 10 11 $img = imagecreate($len, 30); 12 13 $textbgcolor = imagecolorallocate($img, 30, 30, 32); 14 $textcolor = imagecolorallocate($img, 70, 255, 155); 15 16 imagestring($img, 5, 5, 5, $title, $textcolor); 17 imagefilledrectangle( $img, $offset, 0, 2000, 30, $textcolor ); 18 imagestring($img, 5, $offset + 5, 5, $content, $textbgcolor); 19 20 ob_start(); 21 imagepng($img); 22 } else { 23 echo "error<br>"; 24 echo "please set the `t` and `c` query perams to use this"; 25 } 26 ?>