How to run PHP script

nnCron and nnCron LITE discussion

How to run PHP script

Postby cervenak » Tue, 21 Feb 2006, 06:29

Hi,
Im trying to run PHP with nnCron. My nncron.tab has line:

15 4 * * * * HTTP-GET:http://www.myserver.com/my.php?note=cron

nnCron seem to work, but my.php script should write "note" into file, but in this file is nothig.

http://www.myserver.com/my.php?note=cron
from Browser (Explorer) works fine.
Could anybody help me where is mistake?
Thanx cervenak
cervenak
 
Posts: 2
Joined: Tue, 21 Feb 2006, 06:18

Postby VK » Tue, 21 Feb 2006, 12:19

I'm pretty sure you should try smth like this if you like to start a php-script on remote server using nnCron classic syntax:
Code: Select all
15 4 * * * * c:\program files\<path to IExplorer>\iexplore.exe http://www.myserver.com/my.php?note=cron


Use the nnCron advanced syntax if you want to do the same using the HTTP-GET word. More info - in the docs.
CU
VK
User avatar
VK
 
Posts: 680
Joined: Wed, 14 Jul 2004, 19:17

Run PHP script

Postby cervenak » Tue, 21 Feb 2006, 14:52

Thanx,
this suggestion works good. But explorer is still open. Yes I know, that I shut down them, but its not effective.

I was looking in the doc for HTTP-GET directive, but I found only script for downloading. Does anybody have any example of simply opennig script though HTTP-GET?

Thanx a lot again
Cervenak
cervenak
 
Posts: 2
Joined: Tue, 21 Feb 2006, 06:18

Postby VK » Tue, 21 Feb 2006, 16:26

smth like this:
Code: Select all
Action:
     S" http://www.myserver.com/my.php?note=cron" HTTP-GET 0=
     IF
        2DROP
     ELSE
        2DROP
        MSG: "Error!"
    THEN
CU
VK
User avatar
VK
 
Posts: 680
Joined: Wed, 14 Jul 2004, 19:17


Return to nnCron forum (English)

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests

cron