Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timgws/domainlist
Manage lists of domains, ensuring only valid ones sneak through.
https://github.com/timgws/domainlist
Last synced: about 2 months ago
JSON representation
Manage lists of domains, ensuring only valid ones sneak through.
- Host: GitHub
- URL: https://github.com/timgws/domainlist
- Owner: timgws
- Created: 2015-06-16T01:42:22.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-06-16T06:31:33.000Z (over 9 years ago)
- Last Synced: 2024-04-17T05:36:41.240Z (9 months ago)
- Language: PHP
- Homepage:
- Size: 121 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# DomainList
A quick class for managing lists of domains. Nothing special.
[![Test Coverage](https://codeclimate.com/github/timgws/domainlist/badges/coverage.svg)](https://codeclimate.com/github/timgws/domainlist/coverage)
[![Code Climate](https://codeclimate.com/github/timgws/domainlist/badges/gpa.svg)](https://codeclimate.com/github/timgws/domainlist)## Example of adding domains
```php
$list = new DomainList('ing');$list->add([
$list->c('the awesome € shop'),
$list->c('hex-follows-0xaf--0xfacebeef'),
$list->c('--lol-0xfacebeef')
]);$domains = $list->get();
//---
$domains = [
'hex-follows-0xaf-0xfacebeef.ing',
'hexfollows0xaf0xfacebeef.ing',
'the-awesome-eur-shop.ing',
'theawesomeeurshop.ing'
];
```This class should validate that domains match [RFC 1035](https://tools.ietf.org/html/rfc1035) valid domains.