1

I'm trying to get all the questions for on Meta Stack Overflow in PHP.

The code I'm using is as follows:

<?php

$feed = file_get_contents('https://api.stackexchange.com/2.2/questions?order=desc&sort=creation&tagged=documentation&site=meta.stackoverflow&page=4&pagesize=100&key=secretkey');
$feed = gzinflate(substr($feed, 10, -8));

$feed = json_decode($feed, true);
$title = $feed['items'][0]['title'];

echo $title . "\n";

?>

However, it doesn't seem to work. How can I fix this, or is there a better way to do this?

0

You must log in to answer this question.

Browse other questions tagged .