Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - PHP Images
  
User name:
Password:
Reply:
 

UserPost
Elric
Posts: 605/687
Heh. That was too easy a solution. Thanks!
Narf
Posts: 87/100
imagecreate(strlen($emailaddress)*imagefontwidth(2),imagefontheight(2));

Assuming you use 2 as your defautl font size.
Elric
Posts: 603/687
Well, I just made mine. Profile checks to see if an e-mail address was specified, and if so, it calls email.php?id=$id as an image. Email.php uses a mysql_query to fetch the e-mail address and pass it into a variable. Then I use ImageCreate() to make the background, allocate the bg and text colors, fill the bg, and use ImageString() to print the e-mail address to the image.

The end result looks like this:

No e-mail address actually shows up anywhere in code. And if a user didn't specify an e-mail in their profile, it just shows up with my old txtgfx.php as

Now I just need to learn how to get the length of the e-mail address so that the bg isn't too large or too small. I'm pretty sure it has something to do with strlen and maybe count, but I dunno yet... Still learning.
HyperLamer
Posts: 7224/8210
For emails, I suggest using an encryption system of some sort. My site links to arbitrarily-named images which contain the email address on a scribbled multicolour background (so they can't even read it out of the image itself), and uses Javascript to launch the mail program when the user clicks an image. Users see an email address, bots see Send_Message('gxodqg`bjdq','hnbjm','moc')".
Elric
Posts: 601/687
Yeah. Without the GD2 library, those files I gave you won't do squat. Since you asked for them, I figured you had GD installed... Sorry.

Also, if you plan to use my emailgfx file with your board, note isn't the most secure thing against e-mail harvesters. If a user has their e-mail set as my.email@mailer.com, that e-mail address will be in the HTML for the page, even though it doesn't show. Users should replace @ and . with (at) and (dot) to help deter spam harvesters.

Working with my new ElricSig, I've learned quite a bit about working with dynamic images and PHP, so I'll probably use that knowledge to make an AcmlmBoard mod that shows the e-mail address as an image with no e-mail address in the source.
DarkSlaya
Posts: 4127/4249
You need to have GD2 installed on your server.
Book Keeper
Posts: 150/160
I have Apache2 running with php4, why don't php images work?, I've edited to file to the point where they should work together but for some reason they are not working.

http://bookworm.myftp.org/emailgfx.php?n=text - file thanks to Elric, it shoud be working but it isnt.
Acmlm's Board - I2 Archive - Programming - PHP Images


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.002 seconds.