Based on your comments on other answers, it sounds like you want to provide access to the your save scripts to other servers and developers. The standard best practice way to do this is to offer a Web Service. Either an API that can be accessed via cURL, REST, or maybe even expose a SOAP server.
There's an old school trick to do some of these things, though, if you're looking for a quick and easy way to expose this script. You can use image embedding in HTML, kind of like how old school site counters work.
The page includes an image:
<img src="http://yoursite.com/your_script.php" />
And your_script.php
does your database write logic, and responds with the appropriate MIME type, plus the data of a blank GIF.
This is used more often to share cookies across multiple domains and services using multiple types of technologies, but could work in your case.
I'm not advising its the BEST way to go. But it could work for you.
Edit
Another reason I outlined this solution is because it does not require PHP on the initial page. When your question stated that the pages may be uploaded by users, I got heart palpitations thinking about user uploaded PHP including your PHP. Please don't let users upload and execute PHP code. Please oh please!