Home / Programming / php / How can I run a remote web script or page from php?
How can I run a remote web script or page from php?
Last updated: 02/07/2012
You can query any URL from php
, and pull in the results. This can be useful for triggering a script remotely, or loading specifc html / xml content you want to parse somehow. Here's a code snippet to run a remote URL:
This just prints out the lines retrieved, but you could parse them in another way. I used this snippet to trigger a remote script, so I wasn't doing anything with the results.