473,386 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Auto updating the Client page

Dheeraj Joshi
1,123 Expert 1GB
Hi guys, I have got a question.

I have a client page .php and a php script to server that client page.

So can my php page in server can send the updated values for every 1 minute to client page?

I hope you understood my question.

Regards
Dheeraj Joshi
Aug 6 '09 #1
4 1828
Dormilich
8,658 Expert Mod 8TB
well, I don't understand what you want to do with the php scripts, but you can use a cronjob to repeatedly execute something.
Aug 6 '09 #2
dlite922
1,584 Expert 1GB
Server does not send anything to client spontaneously. It only "serves" requests from the client.

The client initiates all communication with a server. (Like in a restaurant: every restaurant server in the city doesn't come to your house without being asked)

Thus, your next question would be:

How do I make the client request every 60 seconds?

Now that's a better question. The answer? JavaScript !!

You can have JavaScript run something every set period of time. This could be an AJAX function or a function to reload the page (re-request the data from the server)

Want a head start?

Expand|Select|Wrap|Line Numbers
  1. // reload the page every 60 seconds
  2. setTimeout(location.reload(), 60000);
  3.  
Cheers,



Dan
Aug 6 '09 #3
Frinavale
9,735 Expert Mod 8TB
If you're really keen on pushing data to the client from the server look up key words like: Reverse Ajax, Comet, Ajax Push, Full Duplex Ajax and Streaming Ajax. It's not an easy implementation and there are a lot of factors to consider so you may change your mind and stick with what Dlite922 recommended....

Dlite922's solution is much much easier to understand and implement :)
Aug 6 '09 #4
Markus
6,050 Expert 4TB
@dlite922
A better solution would be to update only a section of the page, using your suggestion of AJAX. Otherwise, you may be wasting bandwidth.


Big ears,
Mark.
Aug 6 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: VB Programmer | last post by:
I created a page which I am using to prevent the user from hitting the BACK button. I'll call it my "Auto Jump" page. When it is called it basically auto-redirects to a page specified in the...
5
by: Psych971 | last post by:
Hi, I'm wondering how I can generate a postback using javascript on a page that does not have any controls with the auto-postback property set to true. I know I can just use the submit() function...
10
by: sqlboy2000 | last post by:
Hello all, I have something very simple going on here and I'm scratching my head as to what the problem is. There are 4 items in my project, 2 webforms, a user control, and a module: ...
14
by: el_sid | last post by:
Our developers have experienced a problem with updating Web References in Visual Studio.NET 2003. Normally, when a web service class (.asmx) is created, updating the Web Reference will...
13
by: Matik | last post by:
Hello everybody, First: SQL Server 2000 sp3a, HP cluster server, MS 2003 server, database recovery model simple Torn page detection: When I have this option turned on, processes conected with...
0
chumlyumly
by: chumlyumly | last post by:
Hello scripters - OS: Mac OSX Language: PHP w/ MySQL database I've created an insert page where a user inputs his info, which then goes to four different tables in a MySQL database. The...
6
by: Jeff | last post by:
Updating my bag of tricks again. What's the level of support for margin: auto. Is this widely supported now amongst almost all browsers? It's a common request to have a "centered" page. I...
16
by: Stevo | last post by:
I'm guessing this is a laughably obvious answer to many here, but it's not to me (and I don't have a server or any knowledge of PHP to be able to try it). It's not strictly a PHP question, but...
2
by: =?Utf-8?B?TUNN?= | last post by:
I have an asp.net page that contains an update panel. Within the update panel, controls get added dynamically. During partial page post backs the controls within the panel will change. I have a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.