CURL und SSL

Alles, was PHP betrifft, kann hier besprochen werden.

CURL und SSL

Postby martin1 » 21. January 2009 13:34

Hallo,

ich habe bei meinem XAMPP curl eingeschaltet und hier gelesen:
viewtopic.php?f=16&t=32943&p=133593&hilit=curl#p133593
dass
libeay32.dll
ssleay32.dll
im windows system ordner liegen müssen (ist erledigt).

Außerdem soll man bei
http://curl.haxx.se/download.html
http://www.gknw.net/mirror/curl/win32/c ... ingw32.zip

die Version runterladen und installieren:

Die Files habe ich runtergeladen, aber wie installiert man ein neues Curl in mein Win XP Xampp?
ein php_curl.dll zum Austausch war bei den Files nicht dabei?

Gruß
martin1
 
Posts: 4
Joined: 21. January 2009 13:29

Re: CURL und SSL

Postby Wiedmann » 21. January 2009 13:39

Wie willst du Curl denn benutzen?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: CURL und SSL

Postby martin1 » 21. January 2009 15:12

Ich verwende es in PHP, z.B.:

<?
$post_url = "https://www.xxxx";
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL,$post_url);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_request");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$xml_result = curl_exec ($ch);
curl_close ($ch);
print_r($xml_result);
?>
martin1
 
Posts: 4
Joined: 21. January 2009 13:29

Re: CURL und SSL

Postby Wiedmann » 21. January 2009 15:38

Für die PHP-Extension musst du nichts herunterladen. (in dem von Dir genannten Thread ging es im das Shell-Binary)
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: CURL und SSL

Postby martin1 » 21. January 2009 15:42

Ich bekomme aber mit https:// Domains kein XML Result, bei normalen Domains schon.
Woran kann das liegen?
martin1
 
Posts: 4
Joined: 21. January 2009 13:29

Re: CURL und SSL

Postby Wiedmann » 21. January 2009 15:48

evtl. an einem "fehlendem":
Code: Select all
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: CURL und SSL

Postby martin1 » 21. January 2009 16:08

Danke, jetzt geht es. Ich hatte schon mehrere h probiert. Vielen Dank.
martin1
 
Posts: 4
Joined: 21. January 2009 13:29


Return to PHP

Who is online

Users browsing this forum: No registered users and 25 guests