php - How can I multithread with curl? -


i have hash checker works curl. checks hashes api. api fast can make faster multithreading?

here current code. it's current speed 1-2 hashes per second. want more that.

<?php include_once("curl.php") ; $hashes = file_get_contents("hashes.txt"); $accs = explode("\n",$hashes); foreach($accs $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; } ?> 


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -