Output is correct. when input is To get |
Example:
HTML
<?php
$url = 'http://test.google.co.uk';
$info = parse_url($url);
$pieces = explode(".", $info['host']);
$len = strlen($pieces[1]); // returns character length of google = 6
echo $len;
?>
How to count domain length in PHP | PHP Domain Tutorial |
How to get domain extension from php string | PHP Domain Tutorial |
How to get Domain http request info in PHP | PHP Domain Tutorial |
How to extract Domain length in PHP | PHP Domain Tutorial |
Read Full:: | PHP Domain Tutorial |
Category: | Web Tutorial |
Sub Category: | PHP Domain Tutorial |
Uploaded: | 4 months ago |
Uploaded by: | Admin |
Views: | 3 |
Ref on: | View |