Posted in

Función PHP para chequear si un link tiene el http inicial

checkHTTP($urlStr){
o$parsed = parse_url($urlStr);
oif (empty($parsed['scheme'])) {
o    return 'http://' . ltrim($urlStr, '/');
o}else{
oreturn $urlStr;
o}

Deixa un comentari

L'adreça electrònica no es publicarà. Els camps necessaris estan marcats amb *


The reCAPTCHA verification period has expired. Please reload the page.