function resimyukle($link)
{
$verimiz=’uploadtype=1&url=’.$link;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, ‘http://www.imageshack.us/transload.php’);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $verimiz);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$kaynak = curl_exec ($ch);
curl_close ($ch);
$veri=’|size=”70″ value=”(.*)”/>|siU’;
preg_match_all($veri,$kaynak,$cikti);
$resim=$cikti[1][6];
return $resim;
}
echo resimyukle(“resim.jpg”);