A simple PHP wrapper for the PhishTank API.
If any of the following are applicable to your project, then the directory structure should follow industry best practises by being named the following.
src/
tests/
vendor/
Via Composer
$ composer require pxgamer/phishtank-php
__construct($url, $api_key = null)
This will initialise the object with all details.
// Api Key parameter is optional. Should be a string if included.
$client = new \pxgamer\PhishTank\Hook($url);
getResults()
This will refresh the results and fetch new ones from the server.
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] =>
)
)
Please see CHANGELOG for more information on what has changed recently.
$ composer test
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.