| 
		
			
			
				
			
			
				 
			
			
				
			
		 | 
		
			
			
				 
			
				
			
		 | 
	||||
| 
				Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.  You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us.  | 
		
		 
		![]()  | 
	
		
			
  | 	
	
	
		
		|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. | 
| 
		 | 
	Thread Tools | 
| 
			
			 | 
		#1 | 
| 
			
			
			
			 Too lazy to set a custom title 
			
		
			
				
			
			
			Industry Role:  
				Join Date: Dec 2002 
				
				
				
					Posts: 21,480
				 
				
				
				
				 | 
	
	
	
	
		
			
			 
				
				php help please <-click
			 
			how do i run a php file from the command line? 
		
	
		
		
		
		
		
	
	I'm trying to add it to cron, but just pasting the path to the file is not working help please       ![]()  | 
| 
		
 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 salad tossing sig guy 
			
		
			
				
			
			
			Join Date: Apr 2002 
				Location: mrthumbs*gmail.com 
				
				
					Posts: 11,702
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 do it through wget.. 
		
	
		
		
		
		
		
	
	so wget "www.site.com/script.php?var=bla"  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#3 | 
| 
			
			
			
			 <&(©¿©)&> 
			
		
			
				
			
			
			Industry Role:  
				Join Date: Jul 2002 
				Location: Chicago 
				
				
					Posts: 47,882
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 /usr/bin/php /path/to/the/phpfile.php 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
	Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000 Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager ![]() Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Jun 2002 
				Location: Seattle 
				
				
					Posts: 1,062
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 If you have the php binary installed on your system (try 'which php' ) to see if you have it installed, you can do: 
		
	
		
		
		
		
		
	
	Code: 
	/path/to/your/php /your/file.php  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Too lazy to set a custom title 
			
		
			
				
			
			
			Industry Role:  
				Join Date: Dec 2002 
				
				
				
					Posts: 21,480
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 thanks guys  
		
	
		
		
		
		
		
	
	 | 
| 
		
 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#6 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Jul 2004 
				Location: The Beach 
				
				
					Posts: 4,626
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 my cronjobs are setup like this, have no idea if you can use this as an example. 
		
	
		
		
		
		
			00,15,30,45 * * * * cd /www/virtual/something/www.lalalalala.com/htdocs/jobs; /usr/local/bin/php toplist.php3 >/dev/null 
				__________________ 
		
		
		
		
	
	ICQ# 143561781  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Industry Role:  
				Join Date: Jun 2004 
				Location: New York, NY 
				
				
					Posts: 6,890
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Normally in the php script itself, I just set as the first line: 
		
	
		
		
		
		
			#!/usr/local/bin/php -q (the -q is for quiet mode, so it doesnt echo the php version and all that) Of course that should be set to wherever php binary is on your machine. Then you just need to have the path of that script in your crontab, nothing additional. 
				__________________ 
		
		
		
		
	
	Skype variuscr - Email varius AT gmail  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#8 | 
| 
			
			
			
			 Too lazy to set a custom title 
			
		
			
				
			
			
			Industry Role:  
				Join Date: Dec 2002 
				
				
				
					Posts: 21,480
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 ok, dont have wget on the server and cant do it thru cron with php cause it needs to run on the domain itself because of permissions 
		
	
		
		
		
		
		
	
	any ideas?  | 
| 
		
 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#9 | |
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Industry Role:  
				Join Date: Jun 2004 
				Location: New York, NY 
				
				
					Posts: 6,890
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 If you don't have permissions to execute the php binary on the system, then accessing it via web seems to be the only way. Two options there are via curl, if its installed, or lynx (again if its installed). 
				__________________ 
		
		
		
		
	
	Skype variuscr - Email varius AT gmail  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#10 | |
| 
			
			
			
			 Too lazy to set a custom title 
			
		
			
				
			
			
			Industry Role:  
				Join Date: Dec 2002 
				
				
				
					Posts: 21,480
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
  | 
|
| 
		
 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#11 | 
| 
			
			
			
			 Confirmed User 
			
		
			
				
			
			
			Industry Role:  
				Join Date: Sep 2005 
				Location: Las Vegas, NV 
				
				
					Posts: 194
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Sorry, wrong thread 
		
	
		
		
		
		
		
		
			
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#12 | |
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Industry Role:  
				Join Date: Jun 2004 
				Location: New York, NY 
				
				
					Posts: 6,890
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 Another option you could do is write a php script that you will call from the cron, looking something like this: PHP Code: 
	
			
	
				__________________ 
		
		
		
		
	
	Skype variuscr - Email varius AT gmail  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#13 | |
| 
			
			
			
			 Too lazy to set a custom title 
			
		
			
				
			
			
			Industry Role:  
				Join Date: Dec 2002 
				
				
				
					Posts: 21,480
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 That worked! thanks man... you rock!!  | 
|
| 
		
 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 |