There is no other way to get a list of all products ids then doing GET /admin/products.json?fields=id (limited to 250 per page).
XML and JSON is not that different except the endpoints end in '.json' and you send your data serialized as JSON instead of XML. It's been a while since I've done PHP but perhaps http://ca3.php.net/json_encode could that for you. For a simple script you could keep using the one you posted earlier.