473,388 Members | 1,480 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,388 software developers and data experts.

Reloading a php file?

Ok, fairly new to php but I am learning. This may be an easy question
but here it goes anyway.

I have a website that is built on php/mysql. My members can send and
get email and instant messages. The problem is for the member to get an
alert that they have a "new message" the page must be reloaded.
Obviously this is a bandwidth kill, plus if the user dosen't pay
attention or view any other pages they will never get an alert.

Does anyone know of a way I can do this in php without reloading the
whole page? In an iframe maybe?

Any help would be greatly appreciated.

Dec 29 '05 #1
5 1532
do it the easy way, with a reloading iframe and META stuff, or the hard
way, with XMLhttprequest, setTimeout, and Javascript.

either way, you r in for one hell of a ride!

/f3L

Dec 29 '05 #2
It's one of those times when AJAX is a sensible solution. Use the
setInterval() function to poll the server every now and then. One thing
to remember is to set up Apache so that it'd exclude the polling script
from the server log. Otherwise it'd grow very rapidly.

Dec 30 '05 #3
Do you have an example of this or know where you can point me to see an
example?

Dec 30 '05 #4
Hell ride is more like it. I see that ajax could do the job but it
looks like a complicated way to do it. How would I do it with iframes
and a meta refresh. Keep in mind that I have to pass session
information.

Jan 12 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: aurora | last post by:
I am looking for a way for reloading updated modules in a long running server. I'm not too concerned about cascaded reload or objects already created. Just need to reload module xxx if the...
8
by: Aspersion | last post by:
I'm building an ASP page that has a lot of text and graphics. There is a calculation facility on the page. The user enters several numbers in a form and presses a button to see the calculated...
2
by: Snolly | last post by:
Hi all, Here is my issue. I have a web page (lets call it page1) with an iframe in it that then opens a pop-up window (page2). The pop-up window is used to edit some data that was loaded into...
3
by: Richard | last post by:
Hey there, I have a textbox and a listbox. When a user types a number in the textbox, I want to get all the records from a MS Access DB but without reloading the page. I now have something...
4
by: R | last post by:
Hi All, I have a problem with reloading JS. I have a DIV where I placed JS code displaying random tricks & tips from other site. at the beggining I had it this way: <div id="tips">
9
by: andrewfelch | last post by:
Hello all, I'm using the metaclass trick for automatic reloading of class member functions, found at: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164 My problem is that if I 1)...
2
by: jamjam19 | last post by:
Hello, I've created a Flash movie with animation as a header for my website. This movie is embedded into my "header.html" file which is called by every page on the site (by way of PHP). Is...
5
by: henryrhenryr | last post by:
Appologies for unclear title. I don't really understand the problem I'm facing. My system: PHP 5.2.1, Win2K, Apache 2, MySQL 5 (local - problem is same on my live site running php 4.3.9, Linux,...
1
by: lukasz.f24 | last post by:
Hello, I came across annoying problem during my fun with mod_python. I turned out that mod_python load package only onca and don't care about any changes to it. Obviously it makes sense on...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.