Skip to content
linkedinURLValidator class is used to validate the linkedin public url.
PHP
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
LICENSE
README.md
example.php
linkedinURLValidator.php

README.md

linkedinURLValidator

linkedinURLValidator class is used to validate the linkedin public url.

How to use


require_once 'linkedinURLValidator.php';

$url = 'http://www.linkedin.com/company/xxxxxxx';

$validator = new linkedinURLValidator($url);

$result = $validator->validate();


if($result['valid'] && $result['type'] == 'company'){

    echo 'Url is valid linkedin company url ';
    echo $validator->get_company_id();
}
else if($result['valid']){

    echo 'Url is valid linkedin public profile url';
}
else{
    echo 'Url is not linkedin public profile url';
}


Something went wrong with that request. Please try again.