oni4i / fake-nz-generator
Fake New Zeland data generator
Installs: 108 007
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
This package is auto-updated.
Last update: 2025-03-29 12:08:17 UTC
README
PHP Generator of New Zealand valid data like IP, zip code and city
composer require oni4i/fake-nz-generator
If you need fake, but valid data like IP, ZIP code and City you can use this PHP library.
Generate random city
$cityGenerator = new CityGeneratorService(); //output "Ahaura" $randCity1 = $cityGenerator->rand(); //output "Athol" $randCity2 = $cityGenerator->rand();
Generate IPs
$ipGenerator = new IPGeneratorService(); //output "14.1.32.0" $firstIP = $ipGenerator->first(); //output "14.1.32.1" $nextIP = $ipGenerator->next($firstIP); //output "14.1.32.0" $prevIP = $ipGenerator->prev($firstIP); //output "14.1.95.255" $randIP = $ipGenerator->rand();
Generate ZIP codes
$zipGenerator = new ZipGeneratorService(); //output "7550" $randZipCode = $zipGenerator->rand(); //output "9749" $randZipCodeByCity = $zipGenerator->randByCity('Athol');