We help IT Professionals succeed at work.

How to create IMAGES to secure EMAIL address Easy question!

kamileris
kamileris asked
on
240 Views
Last Modified: 2008-08-11
Hello,
I have this webpage with user registration when somebody registers only if they want to show their email address to other users that email address will show like myemail@myemail.com I want to make this secure for my users even thought its an option for them to allow their email address public, I want to make this like in image format so no bots can detect it like the one you can see for example http://whois.domaintools.com/experts-exchange.com
If you take a look contact email address has been secured in image format
How can i do something like this one?
Thank you
Comment
Watch Question

Have a look at this link

http://www.13337.org/php-create-image-from-string/

Any Use?

Greenclock
It's very easy. Let me explain you step by step in my next post.

Author

Commented:
I am checking right now thank you

Author

Commented:
Greenclock
this is good only when you are using one thing to create, do you know anything that will automaticly create images for example for: <?=ascii_str($user['email'])?>

shadow_shooter
I would like to know Thank you
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Forgot to add,

At the end you should output this image to browser by imagejpeg() function. Simply, it needs the $bgimage variable that we used.

imagejpeg($bgimage);

Do this coding in a php file, called emailtext.php

Then you should call this php file as if you were adding an image:

<img src="emailtext.php" />

This time, it's done. :)

If you need assistance you can write me back, don't be afraid of code work. Try to understand what I wrote, u'll see it's simple and you can do it!
At the end it's like:


<?php
#This a file called emailtext.php
 
$bgimage=imagecreatefrompng("images/background.png");
$font="fonts/yourfont.ttf";
$color=imagecolorallacote($bgimage, 122, 229, 112); //change the colors to desired ones.
$size=12;
$angle=0;
$coordinateX=10;
$coordinateY=$size+10;
$text=$EMAIL_ADDRESS
 
imagettftext($bgimage, $size, $angle, $coordinateX, $coordinateY, $color, $font, $text);
imagejpeg($bgimage);
?>

Open in new window

Author

Commented:
I will be checking right now give me 15 min thank you so much!
Okay, I'm waiting.

Author

Commented:
How can i put this into:
<?=ascii_str($user['email'])?>

$text=$EMAIL_ADDRESS

Thank you!
I recommend you to use Session variables. First add session_start(); to both startings of the codings in two pages. Then set $_SESSION['emailtext']=$user['email']; in the page where your image will be shown.

In the emailtext.php, change the code as the following:

$text=$_SESSION['emailtext'];

and you're done.

Author

Commented:
I will be checking it soon but thank you for your time I appreciated and I will be giving you points Thank you so much since this is actually using ascii in html I might just forget about doing this if I cant get it to work. Thank you!
I wish I helped you more. Good luck!

Author

Commented:
hey man you helped me much as you could! and i really appreciated! you wrote down whole list of code for me plus the description i wish i can be like you guys one day! i am tring to get my self in good college for computer science after two years of working full time at some fast food store...
I'm sure you'll do the best, just keep reading, have the soul of succeeding in things, never and ever throw in the towel then u'r ready!

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.