PHP Fetching Url With Curl – String Function

<?php
$c = curl_init('http://www.example.com/robots.txt');
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
$page = curl_exec($c);
curl_close($c);
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.