Follow along with the video below to see how to install our site as a web app on your home screen.
Not: This feature may not be available in some browsers.
<?php
function urlmake($u) {
htmlspecialchars($u);
if(!preg_match("/[a-z]:\/\//si", $u)) $u = "http://$u";
return $u;
}
$u2=urlmake($_REQUEST["url"]);
preg_match('@^(?:http://)?([^/]+)@i', $u2, $matches);
$host = $matches[1];
// alan adının son iki parçasını alalım
preg_match('/[^.]+\.[^.]+$/', $host, $matches);
if($matches[0]=="orneksite.org")
header("********: $u2");
?>
Out.php dosyanızı şu şekilde yaparsanız sorun kalkacaktır...
Kod:<?php function urlmake($u) { htmlspecialchars($u); if(!preg_match("/[a-z]:\/\//si", $u)) $u = "http://$u"; return $u; } $u2=urlmake($_REQUEST["url"]); preg_match('@^(?:http://)?([^/]+)@i', $u2, $matches); $host = $matches[1]; // alan adının son iki parçasını alalım preg_match('/[^.]+\.[^.]+$/', $host, $matches); if($matches[0]=="orneksite.org") header("********: $u2"); ?>
orneksite kısmına kendi sitenizi yazın.
Teşekkürler hocam
out.php dosyası oluşturmadan index sayfamda yapabilirmiyim hocam ? yoksa mecbur out php dosyasını oluşturmam mı gerekiyor ?
İkisini de deneyin en iyisi.