|
|
|
Use cURL. This function is an alternative to |
<?php
function url_get_contents ($Url) {
if (!function_exists('curl_init')){
die('CURL is not installed!');
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $Url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
curl_close($ch);
return $output;
}
$url = 'https://horje.com';
echo url_get_contents($url);
?>
| php curl |
Type: | Develop |
Category: | Web Tutorial |
Sub Category: | PHP Function Tutorial |
Uploaded by: | Admin |