Страница 1 из 1

замена для curl

Добавлено: 2011-06-09 14:00:38
Alex Keda
есть такая функция

Код: Выделить всё

# functions, from https://github.com/the-dan/QIWI-PHP-XML/
function QIWIrequest($url, $body) {
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type' => 'text/xml; encoding=utf-8'));
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
        $result = curl_exec($ch);
        curl_close($ch);
        return $result;
}
можно ли её заменить чем-то на чистом php или ещё как...
не-курл, короче...

Re: замена для curl

Добавлено: 2011-06-09 14:10:33
Le1
fopen - не получится ?

Re: замена для curl

Добавлено: 2011-06-09 15:48:38
rmn
http_get()

// edit

а, там post-запрос. Тогда http_post_data()
В общем, http://www.php.ru/manual/ref.http.html