Fetching a URL with cURL : curl_init « String « PHP
- PHP
- String
- curl_init
Fetching a URL with cURL
<?php
$c = curl_init('http://www.example.com/robots.txt');
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
$page = curl_exec($c);
curl_close($c);
?>
Related examples in the same category