helgesverre/telefonkatalog

Scrape Norwegian Phone directories with Laravel.

v1.1.1 2024-04-29 17:00 UTC

This package is auto-updated.

Last update: 2024-10-29 18:03:45 UTC


README

Telefonkatalog: A Package for Norwegian Phone Directory Data Retrieval

Latest Version on Packagist Total Downloads

Overview

Laravel Telefonkatalog is a package designed for scraping data from phone directories. It returns the extracted data as a list of Person objects, making it easier for developers to integrate phone number information into their applications.

This package is specifically tailored for Norwegian developers looking to incorporate auto-fill functionality into forms on a small scale.

Important Note

This package is not designed for large-scale phone number scraping, as it does not provide any protection or bypass against captchas, anti-botting software, IP-blocking, or rate-limiting. It is exclusively intended for low-traffic web apps requiring occasional auto-fill features in customer/user forms.

Supported Phone Directories

This package currently scrapes data from these phone directories:

Installation

Install the package via Composer:

composer require helgesverre/telefonkatalog

Usage

Import the facade, and call the method, no need to make things complicated.

use HelgeSverre\Telefonkatalog\Facades\Telefonkatalog;

// Search by name across all data sources
$people = Telefonkatalog::search('helge sverre');

// Find the first result matching a phone number
$person = Telefonkatalog::find('95965871');

Return value.

  • find("number or name") returns a single Person object.
  • search("number or name") returns many Person objects as a laravel collection.

Example:

HelgeSverre\Telefonkatalog\Data\Person {
  +phone: "95965871"
  +name: "Helge Sverre Hessevik Liseth"
  +address: "Vognstølen 29"
  +city: "Bergen"
  +postalCode: "5096"
  +url: "https://www.gulesider.no/oppslag/77190505/person"
  +source: "Gulesider.no"
}

License

The MIT License (MIT). Please see License File for more information.