OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Builduing a linux service that gets weather data Re: Re: Builduing a linux service that gets weather data

#23821

Samer
Keymaster

I am using file_get_contents but I set a global timeout. I was debating curl but decided that some installations might not have curl support (I don’t think it is part of the base PHP package) so I decided to stick with file_get_contents for now. I did refactor my code to call file_get_contents from my own function that way I can easily change how I wish to interface with the OS in the future and also add more error catching, etc.

Thanks for the code post!