<?php function tinypic($adres){ $a = explode("http",$adres); $b = str_replace("=","%3D",base64_encode($a[1])); return "http://1.hidemyass.com/ip-1/encoded/".$b."&f=norefer"; } echo tinypic("http://i45.tinypic.com/4v0083.jpg"); ?>