false, ]; $urlValidated = false; try { $client = new GuzzleHttp\Client(); $res = $client->request('GET', $url, $options); if ($res->getStatusCode() == '200' || $res->getStatusCode() == '301') { $urlValidated = true; } } catch (Exception $e) { error_log("Could not check $url from ".__FILE__); break; } $data = [ 'person_name' => $person_name, 'person_email' => $person_email, 'person_role' => $person_role, 'financial_decision' => $financial_decision, 'contact_language' => $contact_language, 'company_name' => $company_name, 'company_activity' => $company_activity, 'company_country' => $company_country, 'company_city' => $company_city, ]; $client = new GuzzleHttp\Client(); $options['query'] = $data; $res = $client->request('GET', $url, $options); if ($res->getStatusCode() == '200') { echo '1'; } } } break; default: echo ''; } exit;