cenourinha deixo-te aqui uma função que fiz já à algum tempo que transforma qualquer tipo de links para o tipo http: //, ou seja, se o link for "gdg.sgs.rhhrs" fica "http: //gdg.sgs.rhhrs" se for "
www.dsg.segs" fica "http: //www.dsg.segs" se já começar com http fica igual
mas atenção já fiz isto à éne tempo atras, de certeza que encontras melhores scripts, mais simples, e que faça o mesmo ou mais, mas pra ja é capaz de te servir
faz simplesmente passar a variavel que tem o link por esta função (antes obviamente dela passar pela funçºao que a está a transformar nesse link esquesito...
function linkmaker($str){
$str = trim($str);
$str = htmlspecialchars($str);
$str = preg_replace('#(.*)\.(.*)\.(.*)#','http://\\1.\\2.\\3',$str);
$str = preg_replace('#(.*)\/\/(.*)\/\/(.*)#','http://\\3',$str);
$str = preg_replace('#(.*)www\.(.*)\.(.*)#','http://www.\\2.\\3',$str);
return $str;
}
fica