Re: Connection refused - subdomain problem suspected
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.htmlReceived on 2019-09-05