Re: Curl problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 12, 2012 at 12:44 AM, Rick Dwyer <rpdwyer@xxxxxxxxxxxxx> wrote:
> On Jan 11, 2012, at 6:29 PM, Matijn Woudt wrote:
>
>> On Thu, Jan 12, 2012 at 12:20 AM, Rick Dwyer <rpdwyer@xxxxxxxxxxxxx>
>> wrote:
>>>
>>> Hello all.
>>>
>>> I use curl to make a call to another page on my site... but it operates
>>> erroneously.... sometimes working... sometimes not.  The page it calls
>>> creates an email and I can see on the server the email in the queue when
>>> it's working.  If I echo out the URL the curl command is supposed to load
>>> and load it manually, it works without fail.
>>>
>>> Any help on what I am doing wrong below is greatly appreciated.
>>>
>>> Thanks.
>>>
>>>
>>> $curl_handle=curl_init();
>>>
>>> curl_setopt($curl_handle,CURLOPT_URL,'https://mydomain.com/email_confirmation.htm?id_order='.$id_order.'&sess_id='.$sess_id);
>>> curl_exec($curl_handle);
>>> curl_close($curl_handle);
>>>
>>>  --Rick
>>
>>
>> It's maybe not a real answer to your question, but if all you want to
>> do is call that page, why don't you just use
>>
>> file_get_contents(https://mydomain.com/email_confirmation.htm?id_order='.$id_order.'&sess_id='.$sess_id);
>> (See [1])
>> It works out of the box, and I have found curl unstable too sometimes.
>>
>> Matijn
>
>
> Thanks Matijn,
> But I get "Notice: file_get_contents() [function.file-get-contents]: Unable
> to find the wrapper "https" - did you forget to enable it when you
> configured PHP?"... I'm using a hosting provider and I don't believe they
> will enable this for security reasons.
>
> --Rick

It seems like they have not compiled PHP with SSL support, or they're
using a pretty old version. Anyway, you're probably stuck with cURL
then, check the return of curl_exec, and if false, call curl_error to
get an error message.

Matijn

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux