|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I need to setup a php script to call and run another php script that is on a different web server.
Basically, I have cron access on one server, but not on another and want to run a daily report on the server without cron access. Is there a simply way to do this and how? example: - test1.php - lives here: http://www.website1.com/test1.php - cron job runs test1.php - test1.php runs and calls test2.php which lives here: http://www.website2.com/test2.php - test2.php runs and does a simple query and emails results. how do i call test2.php to run from the other website? |
|
#2
|
|||
|
|||
|
Hi,
I am also facing similar problems. Need help. regards dero |
|
#3
|
||||
|
||||
|
You could try some of PHP's file commands, or socket commands...
PHP Code:
Connecting to the script like this will in essence execute the script. Notice that the path in the fsockopen command is the path to your webserver. Your filename is found further down in the string containing the HTTP method GET. In the comment section of the PHP Manual, edwin has posted this function which might make things a little easier for you: PHP Code:
Refer to the Fsockopen command in the PHP Documentation for more information. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > need php script to call/run another php script on different server |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|