0

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

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by CasTex
0

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. ;-)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.