Skip to content
This repository has been archived by the owner on May 31, 2019. It is now read-only.

crit/domain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Domain Abstraction Class

This is my helper method for dealing with url strings. Specific to a couple of projects I'm working on

Install

Easy install with Composer.

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

About

PHP Domain Parsing Abstraction

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages