I have an example below from the registrar and when implemented (in a loop) it takes between 500ms to 1s between checks.
I need it to run as quickly as possible, whether it be through curl or without. It seems curl takes forever between checks.

I only need the script to check one domain.

1. Is there a way to loop a post of $url and return the output foreach results, much quicker than 500ms per check? Alternative to curl?
2. Running through curl, but checking the domain availability in such a way where it does not lag in checks?

I can post the variable $domainslist (an array with a limit of 20 domains , or in my case, 20 copies of the same domain), it will exec curl, check availability on each and output with only 0.00022 avg lag between checks. When I loop the curl exec it will then run the above array of domain in lightning speed time, lag 5-8 seconds and execute the 20 again in lightning speed time.

3. Is there some way to stop that 5-8 second lag between the checks of each array? I assume not, only because it must reconnect curl..

Any help checking availability in minimal time, no matter which method, would be very much appreciated! Thanks!

Code without loop

PHP Code:

function GetCurlPage ($pageSpec)
$ch curl_init($pageSpec);
$tmp curl_exec ($ch);
curl_close ($ch);
$tmp preg_replace('/(?s)<meta http-equiv="Expires"[^>]*>/i'''$tmp);
$tmp explode('<br>'$tmp);

$returnUrl "http://www.mysite.com/check.php";
$url "https://www.apisite.com/availability/check.php?domain=testdomain&suffixes=.com";
$output GetCurlPage("$url");