curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Connection refused - subdomain problem suspected

From: René Berber via curl-library <curl-library_at_cool.haxx.se>
Date: Wed, 4 Sep 2019 20:29:52 -0500

On 9/4/2019 5:45 PM, Richard G Elen via curl-library wrote:
[snip]

Easy way out: add CURLOPT_VERBOSE to the options and see if the log
gives any good hint.

> TEST CODE
>
> <?php
> header("Content-type: application/json; charset=utf-8");
>  
>         $url =
> "https://streams.ourstation.org:2199/rpc/ourstation/streaminfo.get";
>        
>        
>         $mysession = curl_init();
>         curl_setopt($mysession, CURLOPT_URL, $url);
>         curl_setopt($mysession, CURLOPT_RETURNTRANSFER, 1);
>         curl_setopt($mysession, CURLOPT_CONNECTTIMEOUT , 10);
>         curl_setopt($mysession, CURLOPT_FAILONERROR, true);

Don't know/use php but... all options to curl are long integers, does
the above really work (i.e. 1 instead of 1L)?

>           $json = json_decode(curl_exec($mysession), true);
>          
>          
>         if (curl_errno($mysession)) {
>         echo "error: " . curl_error($mysession);
>         }else{
>         echo json_encode($json,JSON_PRETTY_PRINT);
>         }   
>             
> ?>

Guess time:

Could be many things, SSL options (CURLOPT_CAINFO), SSL library used
with php (OpenSSL and gnutls usually work, others may not).

-- 
R.Berber
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2019-09-05