I'm trying to include db.php and pass a variable to it.
This is what I have:
include "https://imprss.herokuapp.com/db.php?id=6626068";
Looks perfect to me but it simply won't work.
https://imprss.herokuapp.com/db.php?id=6626068 is not returning PHP code, it outputs HTML code to be interpreted by the browser, if you are interested in getting the HTML code of that page then dont use include() instead you should use cURL functions or the fopen url handlers .
I would use a relative path, but only thing you are missing are braces around the quotes which define url.
It is not possible to include a php file on another server, because this would be a security vulnerability. You can, however, use file_get_contents to get the output of a php file.
error_reportingyet?