Page 1 of 1

[ANSWERED]: Retrieve Indigo status with php

PostPosted: Mon Aug 11, 2014 9:14 am
by DVDDave
In order to make use of the cool Pebble My Data on my Pebble watch, I'm trying to access Indigo information by calling the file_get_contents($URL) with a URL to the built-in web server from a php script. The URL works fine in a web page and I often use php to create such web pages, but when I try to authenticate directly in the php function, I get an access error 401. If I turn off authentication in the Indigo web server, it works fine.

Is there something in Indigo that is blocking this type of programmatic access? If so, is there any workaround so I can access Indigo data from php without a web page.

Thanks.

--Dave

Re: Retrieve Indigo status with php

PostPosted: Mon Aug 11, 2014 10:08 am
by FlyingDiver
You'll need to set up the URL request with Digest Authentication to get it to work. See: http://stackoverflow.com/questions/2140 ... henticatio

Re: [ANSWERED]: Retrieve Indigo status with php

PostPosted: Mon Aug 11, 2014 3:52 pm
by DVDDave
Thanks! That worked using curl.

--Dave