curl_multi_exec
$nodes = array('http://www.google.com', 'http://www.microsoft.com', 'http://www.rustyrazorblade.com');
$node_count = count($nodes);
$curl_arr = array();
$master = curl_multi_init();
for($i = 0; $i < $node_count; $i++)
{
$url =$nodes[$i];
$curl_arr[$i] = curl_init($url);
curl_setopt($curl_arr[$i], CURLOPT_RETURNTRANSFER, true);
curl_multi_add_handle($master, $curl_arr[$i]);
}
do {
curl_multi_exec($master,$running);
} while($running > 0);
echo "results: ";
for($i = 0; $i < $node_count; $i++)
{
$results = curl_multi_getcontent ( $curl_arr[$i] );
echo( $i . "\n" . $results . "\n");
}
echo 'done';
Also in PHP:
- check null in_array php
- composite unique between two columns laravel migration
- How do you clear cache in Laravel?
- adding header function to href php
- errorLevel php no warnings
- array kley exists php
- cache laravel
- convert to base 64 php
- check if array contains key php
- associative array in one key in value must unique in array check in php
- How to calculate the difference between two dates
- age date de naissance php
- artisan migrate
- Laravel Eloquent, group by month/year
- array search not exists
- check php version
- contains function in php
- can i throw exception in catch block php
- base64 decocde shoiing special char in php
- ?name="" value in php
- base64_decode() output to header location
- ->format('j')
- array reverce php
- browser cache laravel