|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
--with-curl for https
Okay, here's an odd one... I've got libcurl, openSSL and php installed (all the most recent versions). I compiled and installed libcurl and openssl successfully, and compiled PHP with --with-openssl and --with-curl (among other things).
When I run a curl command on the command line to any https site, (ex: curl -v https://www.paypal.com) it works fine. When I run a curl request in PHP to any https site, It returns no page. It makes the request correctly, and the verbose output shows that the SSL connection verifies okay, but still I get nothing. $cookiefile="/tmp/test.cookie"; $user_agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"; $header[] = "Accept: text/vnd.wap.wml,*.*"; $url="https://www.paypal.com/"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($cu, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($cu, CURLOPT_SSL_VERIFYHOST, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_USERAGENT, $user_agent); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiefile); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiefile); $page = curl_exec ($ch); curl_close ($ch); print("PAGE:nn$pagenn"); ?> Also, I get unknown options errors on the SSL curl_setopt commands... Anybody run across this before? Configure finds openssl and curl just fine (I have specified them in the configure arguments too, but no change). I can get https connections using fopen fine too - but I need curl to send post vars, etc. Any help is greatly appreciated! Thanks! |
|
#2
|
|||
|
|||
|
RE: --with-curl for https
$cu AND $ch ????
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Installation > --with-curl for https |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|