JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr{ gilour

File "ValidateLinkWithPhishtank.php"

Full Path: /home/markqprx/iniasli.pro/common-20260222054425/Domains/Validation/ValidateLinkWithPhishtank.php
File size: 773 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace Common\Domains\Validation;

use Common\Core\HttpClient;
use Illuminate\Support\Arr;

class ValidateLinkWithPhishtank
{
    public function execute(string $url): bool
    {
        $key = settings('links.phishtank_key');
        if (!$key) {
            return true;
        }

        $appName = config('app.name');
        $response = HttpClient::post(
            'https://checkurl.phishtank.com/checkurl/',
            [
                'headers' => ['User-Agent' => "phishtank/$appName"],
                'form_params' => [
                    'format' => 'json',
                    'app_key' => $key,
                    'url' => $url,
                ],
            ],
        );

        return Arr::get($response, 'results.valid', false);
    }
}