test - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of test.php

  1. <?php
  2. function gettr($email) {
  3.     $curl = curl_init();
  4.     curl_setopt_array($curl, array(
  5.       CURLOPT_URL => 'https://api.clearout.io/v2/email_verify/instant',
  6.       CURLOPT_RETURNTRANSFER => true,
  7.       CURLOPT_ENCODING => '',
  8.       CURLOPT_MAXREDIRS => 10,
  9.       CURLOPT_TIMEOUT => 30,
  10.       CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  11.       CURLOPT_POSTFIELDS => '{"email": "'.$email.'"}',
  12.       CURLOPT_HTTPHEADER => array(
  13.         "Content-Type: application/json",
  14.         "Authorization: 2ec9af71bac1f3cae56fc122d0fbb394:159e6f90f0c16bef3fe9104f827f574a7bfab3de8630c5ef807c62d40dbb01e8"
  15.       ),
  16.     ));
  17.  
  18.     $response = curl_exec($curl);
  19.     $err = curl_error($curl);
  20.  
  21.     curl_close($curl);
  22.     
  23.     if ($err) {
  24.       echo "cURL Error #:" . $err;
  25.     } else {
  26.       $response = json_decode($response, true);
  27.       echo "Email address: " . $response['data']['email_address'] . "\n";
  28.       echo "Status: " . $response['data']['status'] . "\n";
  29.     }
  30. }
  31. $mailok= '[email protected]';  
  32.  
  33. return gettr($mailok); 
  34.  
  35.  
File Description
  • test
  • PHP Code
  • 22 Feb-2024
  • 1020 Bytes
You can Share it: