I have a hash checker that works with cURL. it simply checks some hashes with an API. the API is fast but can I make it even faster by multithreading?
Here is my current code. It's current speed is 1-2 hashes per second. I really want it to do more than that.
<?php
include_once("curl.php") ;
$hashes = file_get_contents("hashes.txt");
$accs = explode("\n",$hashes);
foreach($accs as $a){
$x = explode(":",$a);
$c = new curl("website.com");
$c->setopt(CURLOPT_FOLLOWLOCATION, true) ;
$c->setopt(CURLOPT_POST, true) ;
$c->setopt(CURLOPT_RETURNTRANSFER, true);
$c->setopt(CURLOPT_COOKIESESSION, 1);
$c->setopt(CURLOPT_COOKIEJAR, 'cookie.txt');
$c->setopt(CURLOPT_COOKIEFILE, 'cookie.txt');
$c->setopt(CURLOPT_POST, true);
$c->setopt(CURLOPT_POSTFIELDS, "hash0=".$x[0]."&verify=".$x[1]);
$done = $c->exec();
echo $done;
}
?>