Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
ivzb каза:file_exists не може да отваря страници на други сървариКакто и да е, ше го правя с fopen(path, r). Ако някой знае по-добър и бърз начин нека сподели
![]()
<?php
// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://www.bbc.co.uk/");
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_NOBODY, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// grab URL and pass it to the browser
$result = curl_exec($ch);
// close cURL resource, and free up system resources
curl_close($ch);
echo "<pre>";
print_r($result);
echo "</pre>";
HTTP/1.1 200 OK
Date: Sat, 03 Sep 2011 09:02:25 GMT
Server: Apache
Set-Cookie: BBC-UID=940e86419e6d4231dd25bbf8e0f051136c7c2f58c050b08cd249d38f89028c3f0; expires=Wed, 02-Sep-15 09:02:25 GMT; path=/; domain=bbc.co.uk;
Vary: X-Ip-is-advertise-combined
Etag: "1315040543"
X-Lb-Nocache: true
Cache-Control: max-age=60, private
Age: 2
Content-Length: 135506
Content-Type: text/html
function check_link($link) {
$open_file = fopen($link, 'r');
if ($open_file) {
return 1;
} else {
return 0;
}
fclose($open_file);
}