http://bybyron.net/test/get-file-ext-b.php <?php
$url = "http://www.domain.tk/idvalue";
$extract = pathinfo($url);
$dname = ($extract['dirname']);
$file = ($extract['filename']);
$ext = ($extract['basename']);
echo "$dname<br>";
# echo "$file<br>";
echo "$ext";
?> http://bybyron.net/test/get-url-parts-b.php <?php
$url = "http://www.domain.tk/idvalue";
$url_parts = parse_url($url);
print_r($url_parts);
$scheme = ($url_parts['scheme']);
$host = ($url_parts['host']);
$path = ($url_parts['path']);
echo "<br><br>";
echo "Scheme: $scheme<br>";
echo "Host: $host<br>";
echo "Path: $path";
?>