cURL example

<?php // Инициализируем курл $ch = curl_init('site_url'); // Параметры курла curl_setopt($ch, CURLOPT_USERAGENT, 'IE20'); curl_setopt($ch, CURLOPT_HEADER, 0); // Следующая опция необходима для того, чтобы функция curl_exec() возвращала значение а не выводила содержимое переменной на экран curl_setopt($ch, CURLOPT_RETURNTRANSFER, '1'); // Получаем html $text = curl_exec($ch); echo $text; // Отключаемся curl_close($ch); ?>

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.