I'm working on a project at school for my data mining class and I want to use the stackoverflow API to obtain the raw data. I was looking at a little introduction tutorial about using PHP to access it and the first code example wasn't working at all. The culprit was the json_decode function. The version of PHP installed on the school server is 5.1.6 and the function only exists >= 5.2. Searching here I found about using pear but the school's PHP is configured with '--without-pear'
What are my best options for getting around these limitations. I'd rather not have to switch entirely to a separate language. Is it possible to make a call to an external function in another language?
The offending line was
$response = json_decode(http_inflate(file_get_contents($url)));
You can install PEAR libraries without using the PEAR installation process. Just download the file from the PEAR website (Services_JSON) and include it manually.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With