How can I do the above, in my script everytime a I post a new topic or reply It doesnt appear untill the user personally RELOADS the page, How can I make it auto display my post or forum topic? Please help External image (may be gone)
Reloading A Php File Everytime A Click Is Made?
Started on the old forum in May 2008 · view the original in the archive · old links redirect here
How can I do the above, in my script everytime a I post a new topic or reply It doesnt appear untill the user personally RELOADS the page, How can I make it auto display my post or forum topic? Please help External image (may be gone)
You can refresh usin' metatags eg ...
<META HTTP-EQUIV="refresh" content="0;URL=http://www.blablabla.com/index.html" >
Place that in your head tags
10 being the number of seconds after refreshing, theres no need for a url at the ent but yu can av it but i dont see the point as itl do the same job
Want something coded email me at sales@webnwaphost.com for a prices.
thanx 4 replying, but i ddnt help much... the first method made my script to reload every nano second... so ive now resoted to using HEADER('Location: MYURL'); after all my sql queries, and it does the work so far, will now just have to come out a way to thank my visitors for posting:)
is it wml or xhtml and mayb post a page here and al av a go puting it in
Want something coded email me at sales@webnwaphost.com for a prices.
This depending on what browsers are being used.
The simplest one, that is almost certain to work on most browsers, is a standard refresh. It is suggested above that you use META-REFRESH in the headers section of your code.
<META HTTP-EQUIV="Refresh" Content="5">
For it to refresh the page automatically when a new post is found or on every mouse click, you would need to use Javascript (possibly AJAX, but this may not be necessary) to check the time/date of the last message in that topic / group / category / whatever and if it differs from what you have on screen, then it tells the browser to reload the page. This is just one way to check for new posts, there are others. These checks could be done every second or every half hour - whatever you find suits best but every 30 seconds sounds reasonable to me.
If frames are available for use (not all browsers allow you to use frames - most mobile phones do not support them, though I'm unsure about newer models), then you could do exactly the same, but with a tiny frame (1x1px) reloading every 30 seconds. If it finds a new post, it could then refresh the page.
I do not know if anybody here uses Gmail, but if you are viewing a 'conversation' and a new message arrives, then a little message in the corner of the screen alerts you to it and you have the option of renewing the page. To me, this is a little more user-friendly, but it depends entirely upon which browser you are using and what functionality they have enabled.