[thelist] replace text link with image php

Andrew Maynes andrew at uk-webdeveloper.co.uk
Mon Apr 15 10:33:00 CDT 2002


Ben this works like some kind of magic I am so happy except for a border around
the image!

cant believe it was so simple ;D not for me though!
andrew

-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Ben Phillips
Sent: Monday, April 15, 2002 04:06
To: thelist at lists.evolt.org
Subject: RE: [thelist] replace text link with image php


> which displays the test as a link what i want to do is call
> an image that represents the text?  does this sound possible?

if you know what the text is going to be, then you can prepare the image
in advance, have it on the server, and then call it like this:

: echo "<A href=\"products.php?m=$m&g=". substr (md5 ($s[1]), 0, 10)
."\"><img src=\"$s[1].gif\" alt=\"$s[1]\"></A>";

if the text is 'Carrots', this will show Carrots.gif.

if you don't know what the text is going to be, then you need to
generate the images on the fly. try ImageMagick:
<www.imagemagick.org/> or PHP's built in GD functions (if they are
included in your install):
<http://www.php.net/manual/en/ref.image.php> &
<http://www.boutell.com/gd/>

benji
inchima.com



--
For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.343 / Virus Database: 190 - Release Date: 3/22/02

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.343 / Virus Database: 190 - Release Date: 3/22/02





More information about the thelist mailing list