Current location: Hot Scripts Forums » Programming Languages » PHP » Running a php script without browser


Running a php script without browser

Reply
  #1 (permalink)  
Old 03-08-10, 04:16 AM
sunanurag sunanurag is offline
Newbie Coder
 
Join Date: Aug 2009
Posts: 51
Thanks: 2
Thanked 0 Times in 0 Posts
Running a php script without browser

Hi All,

I have 1 php script, which is use to calculate somthing after every 1 min and store the output into database. If i ll use browser it will work. I have to run it all the time, always i cant open my browser. Then how to do this.
Reply as soon as possible.
Thanks in advance.

Regards,
Sunanurag
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 03-08-10, 07:30 AM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
Use a cron job and command line php.

php name-of-script.php

Use the cron man page to learn how to set up a cron job.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 03-08-10, 07:56 PM
Jcbones Jcbones is offline
Aspiring Coder
 
Join Date: Mar 2009
Location: North Carolina, USA
Posts: 516
Thanks: 5
Thanked 47 Times in 44 Posts
Here is a reference Crontab – Quick Reference

If you have Cpanel then just click on cron jobs at the bottom in the "Advanced" section.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 03-11-10, 11:38 AM
inclick inclick is offline
New Member
 
Join Date: Oct 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
In some instances, you have to define what php.ini file to use, the path to php, even the path to the file to execute.

While this FAQ article is geared around our product, the concepts will likely help others:
www . inclick . net / faq / index.php ? qid=122

-Bing

Last edited by wirehopper; 03-15-10 at 07:12 PM. Reason: Changed referral link to text
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 03-11-10, 05:43 PM
Jcbones Jcbones is offline
Aspiring Coder
 
Join Date: Mar 2009
Location: North Carolina, USA
Posts: 516
Thanks: 5
Thanked 47 Times in 44 Posts
OR,

if cURL is enabled, just use:
Code:
curl --silent --compressed http://my_domain.com/path/to/script.php
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a PHP script for Online form fields into MySQL database? successforu17 Script Requests 0 03-03-10 07:44 AM
Php Run Script On Remote Server hunterhdolan PHP 10 01-07-10 11:29 AM
Video PHP Script - New Videos Daily yelbom General Advertisements 0 03-03-06 02:04 AM
Trying to recode my php script into c to run on linux... DaJackal C/C++ 1 02-03-06 09:22 PM
trying to create my first simple (?) php script, need guidance HotShotPhoto PHP 1 09-06-04 09:12 PM


All times are GMT -5. The time now is 01:52 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.