icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.
Old August 15th, 2004, 11:31 PM   #10 (permalink)
Surpass Fan
On a golden path...
 
Joined in Nov 2003
432 posts
Gave thanks: 0
Thanked 0 times
Quote:
If that script isn't in the Public_Html forlder, should I put the IP/~username/ intead of my domain? I really don't want any browser to view that file easily.
I'm sure someone will correct me if I'm wrong, but I believe that to run a PHP script via CRON it must be in a PHP enabled directory, and generally those are in the web accessible folders below the public_html. I seem to remember that an entry in the PHP file might allow it to be ran form other directories, but I'm not certain.

As far as someone viewing the file, do you mean the actual contents or the output of the script if it is ran? If you're concerned about the output, just write it so it has no visible output, since it's going to update a database.
fwwebs5 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 16th, 2004, 12:21 AM   #11 (permalink)
Surpass Fan
Comfy Contributor
 
Joined in Apr 2004
Lives in Canada
Hosted on Pipe
141 posts
Gave thanks: 4
Thanked 3 times
Quote:
Originally Posted by fwwebs5
I'm sure someone will correct me if I'm wrong, but I believe that to run a PHP script via CRON it must be in a PHP enabled directory, and generally those are in the web accessible folders below the public_html. I seem to remember that an entry in the PHP file might allow it to be ran form other directories, but I'm not certain.

As far as someone viewing the file, do you mean the actual contents or the output of the script if it is ran? If you're concerned about the output, just write it so it has no visible output, since it's going to update a database.
I just don't want them to run it, because it only need to be run once a week, more than than will screw some stuff off.
__________________
Website : max-worlds.net
Shared Server : Pipe
MadMax is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 16th, 2004, 12:39 AM   #12 (permalink)
sam
Surpass Fan
Super #1
 
sam's Avatar
 
Joined in Dec 2003
Lives in NJ
5,057 posts
Gave thanks: 0
Thanked 4 times
MadMax its fine.

You want a to invoke a page that will update a few tables once a week ? no problem.

id place the php page outside public_html
sam is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 16th, 2004, 2:19 AM   #13 (permalink)
Surpass Fan
Comfy Contributor
 
Joined in Apr 2004
Lives in Canada
Hosted on Pipe
141 posts
Gave thanks: 4
Thanked 3 times
Thanks every one, I have tested a cron job and it worked, now I just got to wait until next sunday to see if it really works! :reddance:
__________________
Website : max-worlds.net
Shared Server : Pipe
MadMax is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 16th, 2004, 2:26 AM   #14 (permalink)
sam
Surpass Fan
Super #1
 
sam's Avatar
 
Joined in Dec 2003
Lives in NJ
5,057 posts
Gave thanks: 0
Thanked 4 times
rock on.

:reddance:
sam is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 16th, 2004, 1:09 PM   #15 (permalink)
Registered User
Comfy Contributor
 
Joined in Mar 2004
Lives in Herts, UK
Hosted on Webdev & SH108
111 posts
Gave thanks: 0
Thanked 0 times
If you want a script in the public_html directory, and you run it through lynx (there are reasons, which I can't remember... heh), you can always just check whether $_SERVER["REMOTE_ADDR"] == $_SERVER["HOST_ADDR"]

I think that should work...
__________________
http://www.blamethepixel.com
Webdev (formerly Serenity)
zogger is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 16th, 2004, 1:20 PM   #16 (permalink)
Marketing Maven
Surpass Staff
 
Kayla's Avatar
 
Joined in May 2003
Lives in Chicago
24,757 posts
Gave thanks: 946
Thanked 807 times
Quote:
Originally Posted by MadMax
Thanks every one, I have tested a cron job and it worked, now I just got to wait until next sunday to see if it really works! :reddance:
*laugh*

:miam2:
Kayla is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On