PHP code example of pxgamer / phishtank-php

1. Go to this page and download the library: Download pxgamer/phishtank-php 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/ */

    

pxgamer / phishtank-php example snippets


// Api Key parameter is optional. Should be a string if 

use pxgamer\PhishTank\Hook;

$result = new Hook('https://github.com');

echo '<pre>' . print_r($result, true) . '</pre>';

pxgamer\PhishTank\Hook Object
(
    [url:pxgamer\PhishTank\Hook:private] => https://github.com
    [requestData:pxgamer\PhishTank\Hook:private] => Array
        (
            [format] => json
            [url] => https://github.com
        )

    [app_key:pxgamer\PhishTank\Hook:private] => 
    [meta:pxgamer\PhishTank\Hook:private] => pxgamer\PhishTank\Meta Object
        (
            [timestamp:protected] => DateTime Object
                (
                    [date] => 2017-08-07 13:18:13.000000
                    [timezone_type] => 1
                    [timezone] => +00:00
                )

            [serverid:protected] => ab9f6c17
            [status:protected] => 1
            [requestid:protected] => 146.112.225.22.59886895b52782.72884672
        )

    [results:pxgamer\PhishTank\Hook:private] => pxgamer\PhishTank\Results Object
        (
            [url:protected] => https://github.com
            [in_database:protected] => 
            [phish_id:protected] => 
            [phish_detail_page:protected] => 
            [verified:protected] => 
            [verified_at:protected] => 
            [valid:protected] => 
        )

)
 bash
$ composer