2017 © Pedro Peláez
 

library snoop

Find informations about an email address owner

image

florianv/snoop

Find informations about an email address owner

  • Friday, January 2, 2015
  • by florianv
  • Repository
  • 11 Watchers
  • 118 Stars
  • 2,640 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Snoop ![Build status][travis-image] ![Version][version-image] ![License][license-image]

:warning: This tool is currently broken as Rapportive recently changed their API so the trick is not available anymore., (*1)

Snoop finds informations about an email address owner such as its name, social profiles, images and jobs., (*2)

Installation

Add this line to your composer.json file:, (*3)

{
    "require": {
        "florianv/snoop": "~1.0"
    }
}

Currently Guzzle 3 and 4 are supported HTTP clients, so you will need to require one of them:, (*4)

  • "guzzle/guzzle": "~3.0"
  • "guzzlehttp/guzzle": "~4.0"

Usage

You can find a simple example using it here, (*5)

First, you need to create an adapter:, (*6)

// If you use Guzzle 3
$adapter = new \Snoop\Adapter\Guzzle3Adapter(new \Guzzle\Http\Client());

// If you use Guzzle 4
$adapter = new \Snoop\Adapter\Guzzle4Adapter(new \GuzzleHttp\Client());

Then you can create a Snoop instance and use it:, (*7)

// Create a Snoop instance
$snoop = new \Snoop\Snoop($adapter);

// Find the person with email 'john@doe.com'
$person = $snoop->find('john@doe.com');

$person->getFirstName(); // John
$person->getLastName(); // Doe
$person->getLocation(); // San Francisco Bay Area
$person->getHeadline(); // Developer at Google

foreach ($person->getImages() as $url) {}

foreach ($person->getJobs() as $job) {
    $job->getTitle(); // Developer
    $job->getCompanyName(); // Google
}

foreach ($person->getProfiles() as $profile) {
    $profile->getSiteName(); // Twitter
    $profile->getUsername(); // johndoe
}

By default, two requests will be issued: one to get a token and the other to get the informations, but you can send them separately:, (*8)

// Fetch a token, maybe store it somewhere
$token = $snoop->fetchToken();

// Find the informations using the token
$person = $snoop->find('hello@world.com', $token);

Exception handling

InvalidTokenException

The InvalidTokenException is thrown when the token is missing or invalid., (*9)

try {
    $snoop->find('hello@world.com');
} catch (Snoop\Exception\InvalidTokenException $e) {
    // You might fetch a new token and retry
}

PersonNotFoundException

The PersonNotFoundException is thrown when there is no data associated with the email., (*10)

try {
    $snoop->find('hello@world.com');
} catch (Snoop\Exception\PersonNotFoundException $e) {
    // This person was not found
}

Notes

  • The API limit is around 50 requests with the same IP every hour
  • It uses a non-documented feature of the Rapportive API explained here
  • There are other implementations using it Python, Ruby

License

MIT, (*11)

The Versions

02/01 2015

dev-master

9999999-dev https://github.com/florianv/snoop

Find informations about an email address owner

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

email social profile information contact

14/06 2014

v1.0.0

1.0.0.0 https://github.com/florianv/snoop

Find informations about an email address owner

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

email social profile information contact