PHP code example of rattfieldnz / shodan

1. Go to this page and download the library: Download rattfieldnz/shodan library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rattfieldnz / shodan example snippets


RattfieldNz\Shodan\ShodanServiceProvider::class,

RattfieldNz\Shodan\Facades\ShodanFacade::class,

@if(isset(Shodan::setUrl('https://github.com')->check()->getResults()))
    // Iterate over associative array results.
    // getResults(true) returns results as JSON-encoded string.
@else
    <p>No results were found</p>
@endif

Shodan::setUrl('https://github.com');
Shodan::check();
Shodan::getResults();

Shodan::setUrl('https://github.com')->check()->getResults();
bash
php artisan vendor:publish --provider="RattfieldNz\Shodan\ShodanServiceProvider" --tag="shodan"