WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Mobile Dev World
Close a set of cURL handles

curl_multi_close

(PHP 5)

curl_multi_closeClose a set of cURL handles

Description

void curl_multi_close ( resource $mh )

Closes a set of cURL handles.

Parameters

mh

A cURL multi handle returned by curl_multi_init().

Return Values

No value is returned.

Examples

Example #1 curl_multi_close() example

This example will create two cURL handles, add them to a multi handle, and then run them in parallel.

<?php
// create both cURL resources
$ch1 curl_init();
$ch2 curl_init();

// set URL and other appropriate options
curl_setopt($ch1CURLOPT_URL"http://www.example.com/");
curl_setopt($ch1CURLOPT_HEADER0);
curl_setopt($ch2CURLOPT_URL"http://www.php.net/");
curl_setopt($ch2CURLOPT_HEADER0);

//create the multiple cURL handle
$mh curl_multi_init();

//add the two handles
curl_multi_add_handle($mh,$ch1);
curl_multi_add_handle($mh,$ch2);

$running=null;
//execute the handles
do {
    
curl_multi_exec($mh,$running);
} while (
$running 0)

//close the handles
curl_multi_remove_handle($mh$ch1);
curl_multi_remove_handle($mh$ch2);
curl_multi_close($mh);

?>

See Also


phpSecurePages is a PHP module to secures pages with a loginname and password. It handles multiple user groups (each has own viewing rights), store data in a MySQL database or a configuration file, and can be used to identify Web site viewers.
Categories : PHP, Security, Authentication
Using Host Header Names to Host Multiple Sites from 1 IP Address [IIS4].
Categories : WinNT, IIS, Web Servers
Take multiple text files and do simple formatting on them and add them to a webpage
Categories : HTML, Filesystem, PHP



Setting up multiple virtual servers and host headers on IIS4
Categories : WinNT, IIS, Web Servers
Multi drop down search form...
Categories : PHP, HTML and PHP, Databases, MySQL
A complete Guestbook using PHP and mySQL. Multiple catagories, Limit entries shown per page, admin backend to delete entries and more... phpGuests v1.6.1
Categories : PHP, MySQL, Databases
PHP MultiList Mailing List Manager
Categories : Email, HTML and PHP, PHP
How to open a new window, display some content inside and close it from within the window.
Categories : Java Script
Multilingual php webpage
Categories : PHP, Languages, Cookies
Using the Return() function to return multiple variables.
Categories : PHP
Sed, a coder's best friend. This lovely linux command allows you to swap strings in a file. Great for changing a variable name in a script with multiple files.
Categories : HTML and PHP, HTML and PHP
Multiple Select box, Select multiple Items from Menu.List box
Categories : PHP, HTML and PHP, Beginner Guides
Functions to read a template file and fill in PHP variables. It will also fill in array variables, displaying parts of the template multiple times.
Categories : PHP, Variables, Filesystem
CheckDateInput - Date Checking / Validation functions - with error reporting, multiple separator support, and y2k fix. Choose either own code or php checkdate function version.
Categories : Date Time, PHP