This is impossible, as there is no possible way to ensure that your server can run forever.
Even if you wrote an application to be distributed across n amount of servers, you'd still have no guarantees there would always be a server with yours running on it, forever.
You could try writing some viral code that infects all possible hosts everywhere, installs an independent, stable PHP installation and locks it to prevent updates, and let your code propagate to n-many servers around the world, of course, but that still doesn't address longevity of the HTTP specifications, network infrastructure around the world, permanence of the pages you intend to scrape information from, reliability of sustainable power, or permanence of the planet.
Best of luck, though. Keep us posted.