Up-to-date Shodan REST API wrapper.
- Each function's return type can be changed by defining RETURN_TYPE to your liking (true = object; false = array)
- Each function is appropriately documented with php-documentor formatting.
- If you're in search of better and more thorough documentation, please refer to Shodan's REST API documentation (https://developer.shodan.io/api).
- For the functions that require subscriptions (banners(), geo() and ports()), refer to Shodan's STREAM API documentation (https://developer.shodan.io/api/stream)
$shodan = new Shodan('apikey');
$search = $shodan->host_search('NASA');
$search = $shodan->host_search('NASA', 2); // Retrieves results from page 2.
$shodan = new Shodan('apikey');
$host_info = $shodan->host('127.0.0.1');
$shodan = new Shodan('apikey');
$count = $shodan->host_count('127.0.0.1');
Determine which filters are being used by the query string and what parameters were provided to the filters.
$shodan = new Shodan('apikey');
$search = token_search('xxx');
$shodan = new Shodan('apikey');
$services = $shodan->services();
$shodan = new Shodan('apikey');
$resolve = $shodan->dns_resolve('shodanhq.com');
$shodan = new Shodan('apikey');
$reverse = $shodan->dns_reverse('shodanhq.com');
$shodan = new Shodan('apikey');
$ip = $shodan->myip();
$shodan = new Shodan('apikey');
$info = $shodan->api_info();
$shodan = new Shodan('apikey');
$banners = $shodan->banners();
$shodan = new Shodan('apikey');
$geo = $shodan->geo();
$shodan = new Shodan('apikey');
$ports = $shodan->ports();