<?
$link = "192.168.196.128";
$a = explode(".", $link);

$b = strlen($a[3]);
$c = substr($link, 0, -$b);

echo "$c";
?>
Published in: PHP
Download

Related snippets