如何使用Rawurldecode()转换为链接? [关闭]

I have a host of files that generate link like this for hosted files:

http://endertec.com.br/hf/see-img.php?img=http://www.endertec.com.br/hf/do.php?imgf=Fav2.png

But when I see link like this on Facebook, it looks like this:

http://endertec.com.br/hf/see-img.php?img=http%3A%2F%2Fwww.endertec.com.br%2Fhf%2Fdo.php%3Fimgf%3Fav2.png

So I researched ways to convert it, and got the following code:

<?php
    $str = 'http://www.endertec.com.br'.$_SERVER['REQUEST_URI'];
    $src = str_replace('see-img.php?img=' , '' ,stristr($str , 'see-img.php?img='));
    string rawurldecode ( string $src )
    echo '<img src="'.$src.'"/>';
?>

But for some reason it does not work, does anyone know how it might work?

You need to store your rawurldecode in something.. try something like this:

$decoded_src = rawurldecode($src);
echo '<img src="'.$decoded_src.'" />';