PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Pierre-Henry Soria   PHP Companies Lookup   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Companies Lookup
Find companies in the Companies House Database
Author: By
Last change:
Date: 3 years ago
Size: 1,889 bytes
 

Contents

Class file image Download

CompaniesLookup

Simple and fast tool to find companies (from their Company Number or Company Name).

I realized there was no such console tools for finding a company from Companies House database (similar to the Unix whois command for finding the domain names' details).

Find Companies with console interface

Steup

  • Be sure PHP 7.0 or higher is installed
  • Install Composer (https://getcomposer.org)
  • Then run:
$ composer install

  • Rename `.env.example` to `.env`
$ mv .env.example .env

  • Request your Companies House API key => https://developer.companieshouse.gov.uk/developer/applications
  • Open the file (with your favourite text editor)
$ nano .env

  • Add the Companies House API Key between the double quote `"` `"`
  • Change the permissions of the `companies` bash file (if you use the bash shortcut file)
$ chmod u+x ./companies

  • Run the script:
$ ./companies <COMPANY_NAME / COMPANY_ID>

OR

php bin/companies companies:search <COMPANY_NAME / COMPANY_ID>

Example to find HSBC company

With the Company Name:

$ ./companies HSBC

Or with the Company ID:

$ ./companies 06388542

  • Enjoy!

Companies House Lookup, real example

Requirements

About me

I'm Pierre-Henry Soria, Software Engineer (love that!) and also passionate about marketing and e-businesses.

Where to contact me?

You can by email at pierrehenrysoria+github [[AT]] gmail [[D0T]] com

License

Under General Public License 3 or later.