定制 baikho/loqate-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

baikho/loqate-php

最新稳定版本:v2.0.0

Composer 安装命令:

composer require baikho/loqate-php

包简介

A PHP Wrapper for the Loqate API

README 文档

README

Latest Version on Packagist Total Downloads MIT Licensed GitHub issues GitHub stars

A PHP Wrapper for the Loqate API.

Installation

composer require baikho/loqate-php 

Usage

$loqate = new \Baikho\Loqate\Loqate('API Key');

Address Verification API

Find Address:

// Simple example. $result = $loqate->address()->find('foo'); // Advanced example. $result = (new \Baikho\Loqate\Address\Find('API Key')) ->setText('foo') ->setIsMiddleWare(TRUE) ->setContainer('bar') ->setCountries('NL') ->makeRequest();

Retrieve Address:

// Simple example. $result = $loqate->address()->retrieve('XX|XX|XXX|XXXXXXXXXX'); // Advanced example. $result = (new \Baikho\Loqate\Address\Retrieve('API Key')) ->setId('XX|XX|XXX|XXXXXXXXXX') ->makeRequest();

Geocoding API

The only APIs currently supported are

Calculate distance between two points.

Easting/Northing, Latitude/Longitude & Postcodes are supported.

$result = $loqate->geocoding()->distance('381600,259400', '380600,25840'); $result = $loqate->geocoding()->distance('51.4733514399,-0.00088499646', '51.492914695,-0.1215161806'); $result = $loqate->geocoding()->distance('SE10 8XJ', 'SW1A 0AA');

Get directions between two points.

Easting/Northing, Latitude/Longitude & Postcodes are supported.

$result = $loqate->geocoding()->directions('381600,259400', '380600,25840'); $result = $loqate->geocoding()->directions('51.4733514399,-0.00088499646', '51.492914695,-0.1215161806'); $result = $loqate->geocoding()->directions('SE10 8XJ', 'SW1A 0AA');

Geocode an International Place or Location

Country must be supplied as an ISO2 or ISO3 country code. Location can be a postal code or place name, Loqate ID also works.

$result = $loqate->geocoding()->geocode('GB', 'London');

Find a UK Place or Location

This can be a full or partial postcode, a place name or street comma town.

$result = $loqate->geocoding()->ukFind('London');

Geocode a UK Place or Location

This can be a full or partial postcode, a place name or street comma town.

$result = $loqate->geocoding()->ukGeocode('London');

Retrieve a UK Place or Location

This can be a full or partial postcode, a place name or street comma town.

$result = $loqate->geocoding()->ukRetrieve('XX|XX|XXX|XXXXXXXXXX');

Reverse Geocode a position to Address or Location

Returns the nearest address or location to the given coordinates. A postcode or coordinates (latitude, longitude or easting, nothing) of the centre of the search.

$result = $loqate->geocoding()->ukReverseGeocode('51.4733514399,-0.00088499646');

Email Verification API

Validate Email Address:

$result = $loqate->email()->validate('foo@example.com');

Bank Account Verification API

Validate Bank Account:

$result = $loqate->bankAccount()->validate('XXXXXXXX', 'XX-XX-XX');

Phone Verification API

Validate Phone Number:

$result = $loqate->phone()->validate('1234567890'); $result = $loqate->phone()->validate('1234567890', 'NL');

统计信息

  • 总下载量: 75.12k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固