473,414 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Show w-mail address as an Image

Hello!

I have a guestbook and intend to show the e-mail adress of postes,
but to avoid span the e-mail must be shown as a png image.
The e-mail is called from a database, and must be converted to an image.
How can i do it?
Best regards,

carlos
Jul 17 '05 #1
5 2335
"Carlos Marangon" <ar****@hotmail.com> wrote in message
news:2c*************************@posting.google.co m...
Hello!

I have a guestbook and intend to show the e-mail adress of postes,
but to avoid span the e-mail must be shown as a png image.
The e-mail is called from a database, and must be converted to an image.
How can i do it?


Not looking at manuals right now... but look at imagestring()

Jul 17 '05 #2
"Carlos Marangon" <ar****@hotmail.com> wrote in message
news:2c*************************@posting.google.co m...
Hello!

I have a guestbook and intend to show the e-mail adress of postes,
but to avoid span the e-mail must be shown as a png image.
The e-mail is called from a database, and must be converted to an image.
How can i do it?
Best regards,

carlos


in source page: (the base64 keeps the addy from being seen in the img call
<IMG SRC="showemail.php?e=<?php print base64_encode($addy); ?>" BORDER=0>
the showemail.php:
<?php
$addy = base64_decode($_GET['e']);
$fnt = 4; // 1 to 5 I believe
$sw = imagefontwidth($fnt) * strlen($addy);
$y = 9;
if ($fnt > 1) {$y = 14;};
if ($fnt > 3) {$y = 17;};
$im = imagecreate($sw,$y);
$black = imagecolorallocate($im, 0, 0, 0);
$white = imagecolorallocate($im, 255, 255, 255);
imagefill($im,0,0,$white);
imagestring($im,$fnt,0,0,$addy,$black);
imagejpeg($im);
exit();
?>

make sure no space, or blank line before first <?php tag

--
Mike Bradley
http://www.gzentools.com -- free online php tools
Jul 17 '05 #3
oops, I forgot about imagefontheight(), I copied code from my gzImage script
for this post, so forgive me if its not to streamlined

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"CountScubula" <me@scantek.hotmail.com> wrote in message
news:2g******************@newssvr27.news.prodigy.c om...
"Carlos Marangon" <ar****@hotmail.com> wrote in message
news:2c*************************@posting.google.co m...
Hello!

I have a guestbook and intend to show the e-mail adress of postes,
but to avoid span the e-mail must be shown as a png image.
The e-mail is called from a database, and must be converted to an image.
How can i do it?
Best regards,

carlos


in source page: (the base64 keeps the addy from being seen in the img call
<IMG SRC="showemail.php?e=<?php print base64_encode($addy); ?>" BORDER=0>
the showemail.php:
<?php
$addy = base64_decode($_GET['e']);
$fnt = 4; // 1 to 5 I believe
$sw = imagefontwidth($fnt) * strlen($addy);
$y = 9;
if ($fnt > 1) {$y = 14;};
if ($fnt > 3) {$y = 17;};
$im = imagecreate($sw,$y);
$black = imagecolorallocate($im, 0, 0, 0);
$white = imagecolorallocate($im, 255, 255, 255);
imagefill($im,0,0,$white);
imagestring($im,$fnt,0,0,$addy,$black);
imagejpeg($im);
exit();
?>

make sure no space, or blank line before first <?php tag

--
Mike Bradley
http://www.gzentools.com -- free online php tools

Jul 17 '05 #4
Hello!

I try run it in my PC and my Apache crashes when execute it.

Maybe you would try it in an account of mine,
in a server where I have an old page stored and I am no longer using it,
due of problems in the server, but I have more 2 months paid.
If you wish I give you the password and login.

Sincerely,

Carlos

"CountScubula" <me@scantek.hotmail.com> wrote in message news:<Lj******************@newssvr27.news.prodigy. com>...
oops, I forgot about imagefontheight(), I copied code from my gzImage script
for this post, so forgive me if its not to streamlined

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"CountScubula" <me@scantek.hotmail.com> wrote in message
news:2g******************@newssvr27.news.prodigy.c om...
"Carlos Marangon" <ar****@hotmail.com> wrote in message
news:2c*************************@posting.google.co m...
Hello!

I have a guestbook and intend to show the e-mail adress of postes,
but to avoid span the e-mail must be shown as a png image.
The e-mail is called from a database, and must be converted to an image.
How can i do it?
Best regards,

carlos


in source page: (the base64 keeps the addy from being seen in the img call
<IMG SRC="showemail.php?e=<?php print base64_encode($addy); ?>" BORDER=0>
the showemail.php:
<?php
$addy = base64_decode($_GET['e']);
$fnt = 4; // 1 to 5 I believe
$sw = imagefontwidth($fnt) * strlen($addy);
$y = 9;
if ($fnt > 1) {$y = 14;};
if ($fnt > 3) {$y = 17;};
$im = imagecreate($sw,$y);
$black = imagecolorallocate($im, 0, 0, 0);
$white = imagecolorallocate($im, 255, 255, 255);
imagefill($im,0,0,$white);
imagestring($im,$fnt,0,0,$addy,$black);
imagejpeg($im);
exit();
?>

make sure no space, or blank line before first <?php tag

--
Mike Bradley
http://www.gzentools.com -- free online php tools

Jul 17 '05 #5
if u want me to, my email address is here:

http://www.gzentools.com/test/showaddy.php

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"Carlos Marangon" <ar****@hotmail.com> wrote in message
news:2c*************************@posting.google.co m...
Hello!

I try run it in my PC and my Apache crashes when execute it.

Maybe you would try it in an account of mine,
in a server where I have an old page stored and I am no longer using it,
due of problems in the server, but I have more 2 months paid.
If you wish I give you the password and login.

Sincerely,

Carlos

"CountScubula" <me@scantek.hotmail.com> wrote in message

news:<Lj******************@newssvr27.news.prodigy. com>...
oops, I forgot about imagefontheight(), I copied code from my gzImage script for this post, so forgive me if its not to streamlined

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"CountScubula" <me@scantek.hotmail.com> wrote in message
news:2g******************@newssvr27.news.prodigy.c om...
"Carlos Marangon" <ar****@hotmail.com> wrote in message
news:2c*************************@posting.google.co m...
> Hello!
>
> I have a guestbook and intend to show the e-mail adress of postes,
> but to avoid span the e-mail must be shown as a png image.
> The e-mail is called from a database, and must be converted to an image. > How can i do it?
>
>
> Best regards,
>
> carlos

in source page: (the base64 keeps the addy from being seen in the img call <IMG SRC="showemail.php?e=<?php print base64_encode($addy); ?>" BORDER=0>

the showemail.php:
<?php
$addy = base64_decode($_GET['e']);
$fnt = 4; // 1 to 5 I believe
$sw = imagefontwidth($fnt) * strlen($addy);
$y = 9;
if ($fnt > 1) {$y = 14;};
if ($fnt > 3) {$y = 17;};
$im = imagecreate($sw,$y);
$black = imagecolorallocate($im, 0, 0, 0);
$white = imagecolorallocate($im, 255, 255, 255);
imagefill($im,0,0,$white);
imagestring($im,$fnt,0,0,$addy,$black);
imagejpeg($im);
exit();
?>

make sure no space, or blank line before first <?php tag

--
Mike Bradley
http://www.gzentools.com -- free online php tools

Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

77
by: nospam | last post by:
Reasons for a 3-tier achitecture for the WEB? (NOTE: I said, WEB, NOT WINDOWS. DON'T shoot your mouth off if you don't understand the difference.) I hear only one reason and that's to switch a...
3
by: dp | last post by:
I am new to VB.NET and I have a simple question. How do I show a form from a command button click event? The code I have below is not working. I am trying to show the form frmAgent. What am I...
1
by: salo | last post by:
hi at visual basic 6 i write this to the button1_cl1ck unload form1 form2.show
2
by: Ajai Kumar .R | last post by:
Hai all, I've two or more forms on my app. My requirement is, Have to show the first form asa the user press a button have to hide the first form and show the second form. If the user press the...
13
by: Tim Smallwood | last post by:
Hi, This is probably a stupid question, but I can't seem to get a form to show / load? In the older versions of VB I'd use frmMyform.show / load myForm, etc? I looked at the help file and it...
5
by: ali | last post by:
Hello every one i need you help regarding div hide and show. i am having a link like <a href="#" onClick="expandWin()">show/hide </a> <div id=showHide> </div> within div i have lots of...
10
by: =?Utf-8?B?QWxiZXJ0IEZ1?= | last post by:
Hi, my function: myAdjustForm.Show(); I am using the Show method to show the pop-up window to the users in my C# program. I found that I have invoke this function TWICE at the beginning...
1
by: pamate | last post by:
hi, I want to show hide layers. I am able to show and hide layers but i am facing problem that, cant view the cursor in Mozilla,but i can type in input text box, its overlapping the layers. ...
6
by: Xavier PACOTTE | last post by:
Hello, I would like to add some actions to show function of a form with Visual Stuio 2005. Is it possible? Is it possible to create a new Show function which inherit of old it? Best Regards.
2
by: Sudhakar | last post by:
hi I am using MySQL - 4.1.22 when i use the following sql query $result = mysql_query("SHOW tablename STATUS FROM databasename;"); i have also tried = $result = mysql_query("SHOW tablename...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.