All pastes #805702 Raw Edit

Stuff

public text v1 · immutable
·published 2007-12-04 16:15 UTC
rendered paste body
// get host name from URL
preg_match("/^(http:\/\/)?([^\/]+)/i",
    $mystring, $matches);
$host = $matches[2];
echo $host.'<br>';

$str_host = strlen($host);
$str_proto = strlen($proto);
$str_total = $str_host + str_proto;
echo $str_total;