Im trying to creat one on my site and i cant get the darn thing to work
this is what i have in the command line
/usr/bin/php rpg/turns.php
anyone have any ideas for me?
You have to give the full path to rpg/turns.php. For example:
/home/umiya/public_html/rpg/turns.php
I think you might also have to use -f, like:
/usr/bin/php -f /home/umiya/public_html/rpg/turns.php
Another method (sometimes better) is to use wget, like so:
wget -q -O - http://www.yourdomain.tld/rpg/turns.php
-[Unknown]
the php program also needs the shebang line in it because your running it from the shell
#!/usr/local/bin/php (or wherever it is)
if you use wget, you won't need the shebang line in it though...
wget -q -O - http://www.yourdomain.tld/rpg/turns.php
ill try this and post update :)
Quote from: Parham on September 17, 2004, 12:20:38 AM
the php program also needs the shebang line in it because your running it from the shell
#!/usr/local/bin/php (or wherever it is)
if you use wget, you won't need the shebang line in it though...
Actually, that's only if you +x it and try to run it directly. If you call it with /usr/bin/php, it doesn't need the shebang.
-[Unknown]
tried it and this is what i got in email
bin/sh: line 1: /usr/bin/wget: Permission denied
lol i jsut noticed something
does
wget -q -O - http://www.yourdomain.tld/rpg/turns.php
the part in bold have to be there?
Actually, www.yourdomain.tld was an example. The tld stands for "top level domain", which is like .com, .org, etc. Here, that part would be www.simplemachines.org. No tld ;).
You don't seem to have permission from your host to use wget.... that kinda sucks. You might want to ask them why this is, but maybe using php directly will be better. You can also try the "fetch" command, or "curl" - if those aren't denied.
-[Unknown]
well heres what i jsut tried
/usr/bin/php -f /infinite/public_html/rpg/turns.php
and this is what i got back
No input file specified.
Are you sure it's not /home/infinite? Remember, this is your FULL path, not relative to your website or your FTP.
-[Unknown]
/usr/bin/php -f home/infinite/public_html/rpg/turns.php
No input file specified.
still not working :(
Try it with the first / - /home/...
-[Unknown]
/usr/bin/php -f /home/infinite/public_html/rpg/turns.php
like so?
edit- whooooo hooooo thank you so much that did it :)