library domain
Domain parsing abstraction
crit/domain
Domain parsing abstraction
- Friday, December 20, 2013
- by crit
- Repository
- 1 Watchers
- 0 Stars
- 5 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
Domain Abstraction Class
This is my helper method for dealing with url strings. Specific to a couple of projects I'm working on, (*1)
Install
Easy install with Composer., (*2)
php composer.phar require "crit/domain": "dev-master"
Usage
<?php
include "vendor/autoload.php";
use Domain\Domain;
$local = Domain::isLocal("http://google.com"); // false
$ip = Domain::isIP("http://www.google.com"); // false
$host = Domain::Host("http://www.google.com/search?q=php"); // www.google.com
$sub = Domain::Sub("http://a.www.google.com/"); // www (I only need first sub)
$tld = Domain::TLD("http://www.google.com/search?q=php"); // com
$ident = Domain::Identity("http://www.google.com"); // google.com
dev-master
9999999-dev
Domain parsing abstraction
Sources
Download
MIT
The Requires
by
Crit Russell