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

http://my2.statcounter.com/project/standard/graph_summary_barchart.php?rand=193244925&PHPSESSID=1eb9e464667493b2a1a7038ce4b9f69c

Especially, the randed code.

For example, I have this script

uret.php

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

<?
$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 ??

Castex,

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.

$weble=strstr(".gif",'',$_GET);

Hope this will help. ;-)

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.