Hi everyone. I know how to make image in php, but I want to make url like this


Especially, the randed code.

For example, I have this script


<form action="uret.php" method="post">
<input type="text" name="siteadi" value="http://" size="35" \>
<input type="submit" name="submit" value="Kodu Al">

$web = $_REQUEST['siteadi'];
[B]$weble = md5($web);[/B]
if ($_POST["submit"] == "Kodu Al"){
echo $weble;

And it encode the text to md5. Bu how can I make image url with the name of the md5 ??


If you are running apace you can use modrewrite to rewrite and port the image urls to your php script.

Let's assume you have an image url like this: imagepath/3u5h3u5h35uh35.gif

then mod_rewrite should be configured like this (httpd.conf or .htaccess)

RewriteEngine On
RewriteBase /
RewriteRule ^imagepath/(.*)$ /uret.php?SPECIAL=$1 [L,NC,QSA]

the first step in your uret.php script is to convert $_GET to your ordinary $weble md5.


Hope this will help. ;-)

Thanks a lot.
Can you please give me the full script ?