PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > Run a PHP script in background of a Site in every 10 Seconds
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Run a PHP script in background of a Site in every 10 Seconds

Réponse
 
LinkBack Outils de la discussion
Vieux 17/02/2008, 13h29   #1
rahismailbox@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Run a PHP script in background of a Site in every 10 Seconds

I need to run a script in every 10 seconds in background of the site
of 10-15 php pages.
So how do i activate that script?
Is there a code to be embedded in every php page so that the script
got run after every 10 seconds.

I need not to monitor that script.
This script will make some comparisions and then make changes in the
database.
Please reply as this is very neccesary for completion of my project.

Regards
Rahi Jain
  Réponse avec citation
Vieux 17/02/2008, 14h38   #2
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Run a PHP script in background of a Site in every 10 Seconds

rahismailbox@gmail.com wrote:
> I need to run a script in every 10 seconds in background of the site
> of 10-15 php pages.
> So how do i activate that script?
> Is there a code to be embedded in every php page so that the script
> got run after every 10 seconds.
>
> I need not to monitor that script.
> This script will make some comparisions and then make changes in the
> database.
> Please reply as this is very neccesary for completion of my project.
>
> Regards
> Rahi Jain
>


cron (Linux/Unix) or scheduled task (Windows).

But you aren't going to get it every 10 seconds. Both only go down to
one minute.

You can also have the script sleep() or other ways.

But if you have to do this, I have a serious concern about your entire
site design. And you had better plan to rent a dedicated server - there
isn't a shared or vps hosting company I know of which will allow you to
use this many resources on their servers.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  Réponse avec citation
Vieux 17/02/2008, 15h28   #3
rahismailbox@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Run a PHP script in background of a Site in every 10 Seconds

On Feb 17, 7:38 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> rahismail...@gmail.com wrote:
> > I need to run a script in every 10 seconds in background of the site
> > of 10-15 php pages.
> > So how do i activate that script?
> > Is there a code to be embedded in every php page so that the script
> > got run after every 10 seconds.

>
> > I need not to monitor that script.
> > This script will make some comparisions and then make changes in the
> > database.
> > Please reply as this is very neccesary for completion of my project.

>
> > Regards
> > Rahi Jain

>
> cron (Linux/Unix) or scheduled task (Windows).
>
> But you aren't going to get it every 10 seconds. Both only go down to
> one minute.
>
> You can also have the script sleep() or other ways.
>
> But if you have to do this, I have a serious concern about your entire
> site design. And you had better plan to rent a dedicated server - there
> isn't a shared or vps hosting company I know of which will allow you to
> use this many resources on their servers.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================


hey sir,
My structure is
i have to make a bidding site on stock market.
So there are bidding page to make the bidding(Place Order)
But to execute the bidding according to share movement i need a script
which can acess the bidding database and make the deals.
So i need that script to be countinuosly checking all the prices of
stocks around.
If you have a better plan the please let me know.
Your will be highly appreciated
Regards
  Réponse avec citation
Vieux 17/02/2008, 15h52   #4
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Run a PHP script in background of a Site in every 10 Seconds

rahismailbox@gmail.com wrote:
> On Feb 17, 7:38 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> rahismail...@gmail.com wrote:
>>> I need to run a script in every 10 seconds in background of the site
>>> of 10-15 php pages.
>>> So how do i activate that script?
>>> Is there a code to be embedded in every php page so that the script
>>> got run after every 10 seconds.
>>> I need not to monitor that script.
>>> This script will make some comparisions and then make changes in the
>>> database.
>>> Please reply as this is very neccesary for completion of my project.
>>> Regards
>>> Rahi Jain

>> cron (Linux/Unix) or scheduled task (Windows).
>>
>> But you aren't going to get it every 10 seconds. Both only go down to
>> one minute.
>>
>> You can also have the script sleep() or other ways.
>>
>> But if you have to do this, I have a serious concern about your entire
>> site design. And you had better plan to rent a dedicated server - there
>> isn't a shared or vps hosting company I know of which will allow you to
>> use this many resources on their servers.
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================

>
> hey sir,
> My structure is
> i have to make a bidding site on stock market.
> So there are bidding page to make the bidding(Place Order)
> But to execute the bidding according to share movement i need a script
> which can acess the bidding database and make the deals.
> So i need that script to be countinuosly checking all the prices of
> stocks around.
> If you have a better plan the please let me know.
> Your will be highly appreciated
> Regards
>


First of all, you will need a dedicated server. But then you should be
getting an RSS feed or similar with stock prices and adjust based on that.

The task reading the RSS feed could be running all the time, waiting for
input.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  Réponse avec citation
Vieux 17/02/2008, 16h25   #5
rahismailbox@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Run a PHP script in background of a Site in every 10 Seconds

On Feb 17, 8:52 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> rahismail...@gmail.com wrote:
> > On Feb 17, 7:38 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> >> rahismail...@gmail.com wrote:
> >>> I need to run a script in every 10 seconds in background of the site
> >>> of 10-15 php pages.
> >>> So how do i activate that script?
> >>> Is there a code to be embedded in every php page so that the script
> >>> got run after every 10 seconds.
> >>> I need not to monitor that script.
> >>> This script will make some comparisions and then make changes in the
> >>> database.
> >>> Please reply as this is very neccesary for completion of my project.
> >>> Regards
> >>> Rahi Jain
> >> cron (Linux/Unix) or scheduled task (Windows).

>
> >> But you aren't going to get it every 10 seconds. Both only go down to
> >> one minute.

>
> >> You can also have the script sleep() or other ways.

>
> >> But if you have to do this, I have a serious concern about your entire
> >> site design. And you had better plan to rent a dedicated server - there
> >> isn't a shared or vps hosting company I know of which will allow you to
> >> use this many resources on their servers.

>
> >> --
> >> ==================
> >> Remove the "x" from my email address
> >> Jerry Stuckle
> >> JDS Computer Training Corp.
> >> jstuck...@attglobal.net
> >> ==================

>
> > hey sir,
> > My structure is
> > i have to make a bidding site on stock market.
> > So there are bidding page to make the bidding(Place Order)
> > But to execute the bidding according to share movement i need a script
> > which can acess the bidding database and make the deals.
> > So i need that script to be countinuosly checking all the prices of
> > stocks around.
> > If you have a better plan the please let me know.
> > Your will be highly appreciated
> > Regards

>
> First of all, you will need a dedicated server. But then you should be
> getting an RSS feed or similar with stock prices and adjust based on that.
>
> The task reading the RSS feed could be running all the time, waiting for
> input.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================


Thanks sir
But as we are making a virtual market there are no RSS feeds.
We have our own stocks and price manipulators.

One question out of sheer ignorance.
Can we make that script activated by using the ajax module(Javascript)
planted on each page (PHP page) to acivate that script in every ten
seconds?

Regards
  Réponse avec citation
Vieux 17/02/2008, 19h15   #6
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Run a PHP script in background of a Site in every 10 Seconds

rahismailbox@gmail.com wrote:
> On Feb 17, 8:52 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> rahismail...@gmail.com wrote:
>>> On Feb 17, 7:38 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>>>> rahismail...@gmail.com wrote:
>>>>> I need to run a script in every 10 seconds in background of the site
>>>>> of 10-15 php pages.
>>>>> So how do i activate that script?
>>>>> Is there a code to be embedded in every php page so that the script
>>>>> got run after every 10 seconds.
>>>>> I need not to monitor that script.
>>>>> This script will make some comparisions and then make changes in the
>>>>> database.
>>>>> Please reply as this is very neccesary for completion of my project.
>>>>> Regards
>>>>> Rahi Jain
>>>> cron (Linux/Unix) or scheduled task (Windows).
>>>> But you aren't going to get it every 10 seconds. Both only go down to
>>>> one minute.
>>>> You can also have the script sleep() or other ways.
>>>> But if you have to do this, I have a serious concern about your entire
>>>> site design. And you had better plan to rent a dedicated server - there
>>>> isn't a shared or vps hosting company I know of which will allow you to
>>>> use this many resources on their servers.
>>>> --
>>>> ==================
>>>> Remove the "x" from my email address
>>>> Jerry Stuckle
>>>> JDS Computer Training Corp.
>>>> jstuck...@attglobal.net
>>>> ==================
>>> hey sir,
>>> My structure is
>>> i have to make a bidding site on stock market.
>>> So there are bidding page to make the bidding(Place Order)
>>> But to execute the bidding according to share movement i need a script
>>> which can acess the bidding database and make the deals.
>>> So i need that script to be countinuosly checking all the prices of
>>> stocks around.
>>> If you have a better plan the please let me know.
>>> Your will be highly appreciated
>>> Regards

>> First of all, you will need a dedicated server. But then you should be
>> getting an RSS feed or similar with stock prices and adjust based on that.
>>
>> The task reading the RSS feed could be running all the time, waiting for
>> input.
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================

>
> Thanks sir
> But as we are making a virtual market there are no RSS feeds.
> We have our own stocks and price manipulators.
>
> One question out of sheer ignorance.
> Can we make that script activated by using the ajax module(Javascript)
> planted on each page (PHP page) to acivate that script in every ten
> seconds?
>
> Regards
>


Nope. That would only work if you have someone viewing the page with
javascript active. And if you have 50 people viewing the script, you
would try to start it 50 times every 10 seconds.

But then you have some way to change the prices of the stocks. That is
what should be driving your script.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  Réponse avec citation
Vieux 18/02/2008, 10h43   #7
Betikci Boris
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Run a PHP script in background of a Site in every 10 Seconds

On Feb 17, 3:29 pm, "rahismail...@gmail.com" <rahismail...@gmail.com>
wrote:
> I need to run a script in every 10 seconds in background of the site
> of 10-15 php pages.
> So how do i activate that script?
> Is there a code to be embedded in every php page so that the script
> got run after every 10 seconds.
>
> I need not to monitor that script.
> This script will make some comparisions and then make changes in the
> database.
> Please reply as this is very neccesary for completion of my project.
>
> Regards
> Rahi Jain


its not about php use this html code -> <meta http-equiv='refresh'
content='10'>
  Réponse avec citation
Vieux 18/02/2008, 11h00   #8
rahismailbox@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Run a PHP script in background of a Site in every 10 Seconds

On Feb 18, 3:43 pm, Betikci Boris <pard...@gmail.com> wrote:
> On Feb 17, 3:29 pm, "rahismail...@gmail.com" <rahismail...@gmail.com>
> wrote:
>
> > I need to run a script in every 10 seconds in background of the site
> > of 10-15 php pages.
> > So how do i activate that script?
> > Is there a code to be embedded in every php page so that the script
> > got run after every 10 seconds.

>
> > I need not to monitor that script.
> > This script will make some comparisions and then make changes in the
> > database.
> > Please reply as this is very neccesary for completion of my project.

>
> > Regards
> > Rahi Jain

>
> its not about php use this html code -> <meta http-equiv='refresh'
> content='10'>


I think it will work but i need script to be run in back ground.
This way i have to keep that page open all the time during the trading
hours ( Privately on one node).
if any other solution didnt show up i have to use this code and
method.
Regards
Rahi
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h27.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,18434 seconds with 16 queries