在localhost和外部Web服务器之间包含.php文件

I have a web space hosted on an external Linux server to my network . In a PC on my network I installed XAMPP and created an internal web server that runs the script . I need now that the file is included in the localhost in the external server . How can I do?

I tried..

include "http://localhost/myscript.php";
require ("http://localhost/myscript.php");

In practice , I've got to figure out if , the person who is seeing the website is on the PC that has the web server installed , if you must see things , otherwise not.

Thank.