473,466 Members | 1,334 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

GET data and display ajax?

77 New Member
Is there any way to count users in my chatroom and display whos chatting using javascript or ajax? code in php below has issues, but this is what it should do.

Expand|Select|Wrap|Line Numbers
  1.  
  2. <?php
  3.  
  4.  
  5. $chatnames = file('http://client11.addonchat.com/scwho.pl?id=292747&plain=1');
  6. $indx = count($chatnames);
  7. $indxcom = $indx - 1;
  8. if ($indx == 0) {
  9. echo "<b>No one is in the chat room at the moment</b>";
  10. }
  11. else{
  12. echo "<b>People Chatting:</b>&nbsp;&nbsp;";
  13.  for($i = 0; $i < $indx; $i++) {
  14.  $name = explode('    ', $chatnames[$i], 2);
  15. echo " $name[0]";
  16.  if ($i < $indxcom) {
  17.     echo ", ";
  18. }  
  19.  
  20.   }
  21. }
  22.  
  23. ?>
  24.  
Mar 13 '08 #1
1 1121
pronerd
392 Recognized Expert Contributor
I do not think so. JavaScript is a client side language. To do those things you would need to execute code on the server. So you would need a server side language like JSP, PHP, ASP, etc.
Mar 24 '08 #2

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

Similar topics

2
by: christopher.secord | last post by:
I would like have a little "loading..." tab not unlike the one that gmail uses and I would like to display that tab while an ajax call is made. The javascript to display the tab works. The...
3
by: Mazin07 | last post by:
I have a script that makes multiple requests to several sites. However, each request takes a little while. How can I get the PHP script to output data to let the user know that it's checking? ...
8
by: lli | last post by:
Hi Guys, I have designed a web application. In its one window I put a form. User can click submit button of this form to run a pathon script to get data from database. Then User get a new window...
5
by: ggk517 | last post by:
We are trying to develop an Engineering application using PHP, Javascript with Informix as the back-end. Is it possible to retrieve data using Javascript but by accessing the Database. Say...
3
by: SimonPlatten | last post by:
Hi, I'm a software engineer working in the offshore industry, I've been coding in various languages professionally since 1987. In my present employment I am working with control systems in the...
1
by: 2291980 | last post by:
Hello I have create one page where on perticuler click i am calling 6 js function one after another. this all function are ajax function every thing is working fine . But issue is that it takes...
14
by: lmttag | last post by:
Hello. We're developing an ASP.NET 2.0 (C#) application and we're trying to AJAX-enable it. We're having problem with a page not showing the page while a long-running process is executing. So,...
2
by: Lupus | last post by:
Hi, I've written a function in javascript to obtain content using AJAX. While AJAX is loading, I want to show a div which says "please wait while loading. This is a part of the function: ...
4
by: JJ | last post by:
I want to be able to display items and their categories on a page, so that the user can click on an item to edit it, or add further items or categories. Simple enough, however, I want to do it...
2
by: malcster2 | last post by:
hello, i am a beginner to ajax. i have created a mysql database, which i would like to access from a web page. i have created 3 files, a html to display the data, a php file to extract the data,...
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
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...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.