PHP Convert dari text menjadi image. Pernah kalo kamu lagi mengisi form online di sebuah situs biasanya pada email nantinya email tersebut hasil akhirnya berupa gambar..?

Nah, sebenarnya itu merupakan antisipasi terjadinya spam kepada email kamu. Para Spamer memanfaatkan tulisan email buat kirim email-email yang gak jelas terus terusan ke email kamu, yang akibatnya memenuhi inbox aja, tetapi pesenya gak penting semua. 🙂

Pernah buat seperti ini belum. Buat siasati semuanya ada yang namanya PHP Convert tet to image.  Jadi ketika memasukkan tulisan apapun, tulisan tersebut nantinya akan berupa gambar.

Source code phpnya :

<?php
function text2image($string) {
// create a 100*30 image
$im = imagecreate(197, 30);

// black background and white text
$bg = imagecolorallocate($im, 255, 255, 255);
$textcolor = imagecolorallocate($im, 0, 0, 0);

// write the string
imagestring($im, 5, 10, 5, $string, $textcolor);

// output the image
header("Content-type: image/png");
return imagepng($im);
}
if ($_POST['button']){
$email = $_POST['email'];
echo text2image($email);
}
?>

<form id="form1" name="form1" method="post" action="">
  Masukkan Email :
  <label>
  <input type="text" name="email" id="email" />
  </label>
  <p>
    <label>
    <input type="submit" name="button" id="button" value="Submit" />
    </label>
  </p>
</form>

Selamat Mencoba. Bisa di ganti sendiri dan di ubah-ubah sendiri 😀

PHP Convert Text to Image

You May Also Like

26 thoughts on “PHP Convert Text to Image

  1. Thanks a lot for giving everyone remarkably terrific opportunity to read in detail from this web site. It is often very pleasing and as well , jam-packed with a lot of fun for me personally and my office acquaintances to search the blog not less than three times every week to read through the latest items you will have. And lastly, we’re at all times pleased concerning the awesome inspiring ideas you give. Selected 4 areas in this post are in reality the very best I’ve had.

  2. I wanted to post you a very little word to finally thank you again over the gorgeous tips you have featured above. It has been certainly particularly open-handed with you to grant unhampered just what many of us might have made available for an e-book to make some bucks for themselves, especially since you could have tried it if you desired. These good ideas in addition worked to be a good way to be sure that other people online have similar dream much like my personal own to know good deal more on the topic of this condition. I think there are a lot more pleasurable occasions up front for those who browse through your site.

  3. I not to mention my friends appeared to be checking out the best key points found on your web site and so instantly got a horrible feeling I never thanked the blog owner for those tips. Those men were consequently warmed to see them and have in effect certainly been enjoying these things. Appreciation for really being really thoughtful as well as for going for this form of fantastic resources most people are really needing to discover. My very own sincere apologies for not saying thanks to sooner.

  4. Thank you for all of your labor on this website. My daughter loves carrying out investigation and it’s obvious why. Many of us know all relating to the powerful means you provide invaluable solutions by means of your web site and as well as cause participation from the others on the content and our simple princess has been being taught a great deal. Take pleasure in the remaining portion of the year. Your conducting a tremendous job.

  5. I would like to express my thanks to this writer just for bailing me out of this particular problem. As a result of browsing throughout the world-wide-web and finding suggestions which were not beneficial, I assumed my life was gone. Existing minus the answers to the difficulties you have fixed by means of your write-up is a crucial case, as well as the ones that would have adversely affected my entire career if I hadn’t encountered your website. Your own personal training and kindness in playing with a lot of things was invaluable. I don’t know what I would have done if I had not discovered such a step like this. I can also at this point look forward to my future. Thanks a lot very much for your impressive and results-oriented guide. I won’t hesitate to refer your web blog to anyone who should have recommendations about this situation.

  6. I have to show appreciation to this writer just for bailing me out of such a scenario. Because of searching throughout the world wide web and seeing concepts that were not pleasant, I was thinking my life was gone. Existing minus the answers to the issues you have fixed as a result of your entire site is a crucial case, and ones that might have badly affected my career if I had not come across your web site. Your actual knowledge and kindness in taking care of a lot of things was excellent. I am not sure what I would have done if I hadn’t discovered such a thing like this. I can now look forward to my future. Thanks a lot so much for the high quality and amazing help. I won’t think twice to refer the blog to anybody who needs and wants direction about this area.

  7. Thanks a lot for giving everyone such a remarkable possiblity to discover important secrets from this site. It is always so pleasing and also packed with a lot of fun for me personally and my office colleagues to search your website minimum thrice a week to study the fresh secrets you will have. And of course, I’m so certainly satisfied with your astounding advice you give. Certain 3 points on this page are truly the most impressive I have had.

  8. I wish to show my appreciation to the writer just for rescuing me from such a crisis. Right after browsing through the internet and coming across concepts which were not helpful, I believed my life was over. Existing without the approaches to the problems you’ve solved all through your good post is a crucial case, as well as the ones which might have negatively damaged my entire career if I had not come across your web site. Your personal ability and kindness in taking care of all areas was priceless. I’m not sure what I would have done if I had not come upon such a point like this. I’m able to now relish my future. Thanks for your time so much for the specialized and effective help. I will not be reluctant to endorse your blog to any person who wants and needs support on this topic.

  9. I really wanted to jot down a brief word to be able to express gratitude to you for all of the nice tips you are writing here. My time consuming internet lookup has now been honored with reliable insight to share with my neighbours. I would assert that we readers actually are rather fortunate to exist in a good place with many outstanding professionals with interesting basics. I feel extremely blessed to have encountered the webpages and look forward to plenty of more entertaining times reading here. Thank you once again for everything.

  10. I must show some appreciation to the writer just for bailing me out of this particular condition. As a result of checking through the the web and obtaining tricks which were not pleasant, I believed my life was done. Existing minus the answers to the problems you have solved all through the blog post is a crucial case, and ones that would have badly affected my entire career if I hadn’t noticed your site. That training and kindness in maneuvering everything was precious. I don’t know what I would have done if I hadn’t come across such a stuff like this. I can also at this point look ahead to my future. Thanks for your time very much for the skilled and sensible guide. I will not be reluctant to recommend your web page to anybody who should get guide about this matter.

  11. Thanks so much for giving everyone such a brilliant opportunity to read in detail from this web site. It really is so ideal and packed with amusement for me personally and my office fellow workers to search your blog particularly three times in one week to learn the fresh tips you will have. And indeed, I’m so actually happy with your surprising things served by you. Certain 2 areas in this article are clearly the most impressive we have all had.

  12. My wife and i ended up being very joyous Edward managed to carry out his research because of the precious recommendations he acquired out of your site. It’s not at all simplistic to simply possibly be releasing solutions which usually the others could have been making money from. And we fully understand we’ve got the blog owner to appreciate because of that. The illustrations you’ve made, the simple site menu, the relationships you give support to instill – it’s mostly spectacular, and it’s leading our son in addition to us do think this matter is awesome, and that is tremendously indispensable. Many thanks for everything!

  13. I discovered your blog website on google and verify a number of of your early posts. Continue to maintain up the superb operate. I simply extra up your RSS feed to my MSN News Reader. In search of ahead to reading extra from you later on!?

  14. I’m writing to make you understand what a beneficial encounter my daughter developed checking your web page. She discovered numerous pieces, with the inclusion of how it is like to have an incredible helping mindset to make other folks without hassle completely grasp selected tortuous subject areas. You undoubtedly exceeded visitors’ expected results. Thank you for delivering the essential, trusted, informative and easy guidance on this topic to Ethel.

  15. I enjoy you because of your own hard work on this web page. My aunt really loves carrying out internet research and it’s simple to grasp why. Almost all hear all regarding the compelling ways you offer powerful guidance by means of your web site and as well as increase contribution from some other people on that area of interest plus my simple princess is without question studying a whole lot. Enjoy the remaining portion of the year. You are carrying out a brilliant job.

  16. I and also my friends were actually looking at the best tips and hints on your website and so suddenly I had a terrible suspicion I had not expressed respect to the web site owner for those techniques. Those ladies are actually as a consequence glad to study them and have in effect sincerely been having fun with those things. Thank you for really being considerably accommodating and also for making a decision on variety of extraordinary areas millions of individuals are really desperate to understand about. Our own sincere apologies for not expressing appreciation to you sooner.

  17. I wanted to post you the little word just to say thanks again for your exceptional knowledge you have provided above. It was certainly pretty open-handed of you to supply extensively precisely what a few individuals could have distributed for an electronic book in making some dough for themselves, principally seeing that you could possibly have tried it in the event you wanted. Those principles in addition acted like a good way to understand that other people online have a similar passion similar to my own to realize much more on the topic of this issue. I’m certain there are many more enjoyable times in the future for individuals that examine your blog.

  18. I am also commenting to let you understand of the cool discovery my cousin’s child gained checking your web page. She mastered a good number of issues, which included how it is like to have an awesome coaching mood to have certain people with no trouble know precisely some very confusing subject matter. You truly surpassed her expected results. Thanks for coming up with such invaluable, dependable, explanatory and even fun tips on that topic to Tanya.

  19. Thanks for your entire labor on this web page. My mom takes pleasure in going through research and it’s really easy to see why. My partner and i hear all regarding the dynamic tactic you offer very useful thoughts by means of this web site and invigorate participation from other people on the matter and my child is now being taught a whole lot. Take pleasure in the rest of the new year. You’re conducting a powerful job.

  20. I together with my pals appeared to be looking at the best procedures from your web page and all of the sudden came up with an awful suspicion I never expressed respect to the web site owner for those secrets. All of the ladies were for that reason excited to read through all of them and now have actually been enjoying these things. I appreciate you for getting considerably considerate and for choosing varieties of great subject matter millions of individuals are really desirous to be informed on. Our sincere regret for not expressing appreciation to earlier.

  21. I precisely needed to thank you very much all over again. I’m not certain the things I might have undertaken in the absence of the methods provided by you directly on such industry. It truly was a very fearsome dilemma for me, however , being able to view a new well-written avenue you managed it took me to leap with fulfillment. I am just grateful for your work and wish you really know what an amazing job you are always undertaking teaching many people through a blog. I am certain you’ve never got to know any of us.

  22. A lot of thanks for your entire effort on this web site. Betty really loves carrying out investigations and it’s really easy to understand why. My spouse and i learn all concerning the dynamic ways you present very important guidelines via this blog and welcome contribution from other ones about this idea and my princess is always discovering a lot. Take advantage of the remaining portion of the year. You are conducting a fabulous job.

Leave a Reply

Your email address will not be published.