wip
This commit is contained in:
1 parent
cf55e1e218
commit
fbde80c898
4 files changed
+59
-5
No files matched your search
@@ -2,9 +2,11 @@
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Mail\SimpleMail;
|
||||
use App\Utilities\Notice;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
class CloudflareSolverService
|
||||
{
|
||||
@@ -16,6 +18,7 @@ class CloudflareSolverService
|
||||
*/
|
||||
public function getJsonFromUrl(string $targetUrl, int $debug): ?array
|
||||
{
|
||||
|
||||
/**
|
||||
* set in .env
|
||||
* FLARESOLVERR_IP_DOCKER="http://192.168.178.187:8191/v1"
|
||||
@@ -43,10 +46,9 @@ class CloudflareSolverService
|
||||
|
||||
$data = $response->json();
|
||||
|
||||
dd($data);
|
||||
|
||||
if (strpos($data['solution']['response'], '"code": 403, "reason": "challenge"') !== false) {
|
||||
dd($data);
|
||||
Mail::to('hermann.telser@gmail.com')->send(new SimpleMail('STATISTIKO', 'Error 403 challenge'));
|
||||
dd('challenge');
|
||||
}
|
||||
|
||||
if (isset($data['status']) && $data['status'] === 'ok') {
|
||||
|
||||
Reference in new issue
Block a user