PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of riccardo castagna   Fast PHP CURL Multiple Requests   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: EXAMPLE FILE
Class: Fast PHP CURL Multiple Requests
Retrieve the content of multiple URLs using CURL
Author: By
Last change: wrong file
Date: 5 years ago
Size: 562 bytes
 

Contents

Class file image Download
<?php
include_once("./lib/class.curlmulti.php");
$ref= new cURmultiStable;
$urllinkarray = array('http://php.net/manual/it/function.curl-multi-add-handle.php',
'http://php.net/manual/en/function.curl-multi-init.php',
'http://php.net/manual/en/function.curl-multi-setopt.php'
);
/* Since I like to stress the functions add an others request */
$q = true;
if (
$q==true){
array_push($urllinkarray,"http://php.net/manual/it/function.curl-multi-close.php");
}
$urls = $ref->runmulticurl($urllinkarray);
foreach (
$urls as $value){
echo
$value;
}
?>