CURL в PHP - GET запрос

Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2023
Перейти к:навигация, поиск
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

CURL в PHP - GET запрос

Пример кода:

<?php
$ch = curl_init('https://vk.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HEADER, false);
$html = curl_exec($ch);
curl_close($ch);
echo $html; 
?>