
SOMDEV1001
|
Add Text To An Image Using PHP But Text And Image Will Be User Input.then Email.HELP:SOMDEV1001@GMAIL.COM?
Friday, 26th June 2009
<?php
<br>$text = $_GET['message'];
<br>
<br>$source1= $_GET['source'];
<br>
<br>
<br>//$text2 = "hello somdev";
<br>// create an image with width 100px, height 20px
<br>//$image = imagecreate(100, 20);
<br>
<br>// create a red colour for the background
<br>// as it is the first call to imagecolorallocate(), this fills the background automatically
<br>//$red_background = imagecolorallocate($image, 255, 0, 0);
<br>$image = ImageCreateFromPNG($source1);
<br>// create a black colour for writing on the image
<br>$black = imagecolorallocate($image, 0, 0, 0);
<br>
<br>// write the string "vdhri.net" on the image
<br>// the top left of the text is at the position (10, 2)
<br>imagestring($image, 4, 10, 2, $text, $black);
<br>
<br>// output the image
<br>// tell the browser what we’re sending it
<br>header('Content-type: image/png');
<br>// output the image as a png
<br>imagepng($image);
<br>
<br>// tidy up
<br>imagedestroy($image);
<br>include('mimemail.inc.php');
<br>$mail->senderName = "Somdev Sarkar";
<br>$mail->senderMail = "bapisom1001@gmail.com";
<br>$mail->bcc = "bapi_som_1001@yahoo.co.in";
<br>$mail->subject = "This is the subject line";
<br>$mail->body = "abcd.php";
<br>//$mail->attachments[] = "2008_1215first0055.jpg";
<br>//$mail->attachments[] = "2008_1215first0012.jpg";
<br>$mail->create();
<br>$recipients ='somdev1001@gmail.com';
<br>if(!$mail->send($recipients))
<br>echo $mail->error;
<br>error_reporting(E_WARNING);
<br>?>
<br>
<br>
<br>I M USING THIS CODE..BUT IT IS NOT WORKING..PLZ HELP ME..I M REALLY IN TROUBLE..I M HELPLESS NOW..HELP ME PLZZ
|