Real-time Chat

Dec 11, 2007

I wrote a PHP chat system similar to gChat which simply uses constant ajax calls to update the chat. This system is fine for a few users, but with potentially thousands of users, it is much too hard on the server. I've been considering taking the 'Comet' route, but have heard that PHP can't handle Comet very well. What would be the best language/API to perform real-time chat for a large user-base?

ADVERTISEMENT

Implementing Real Time Chat Using A Backend?

Mar 2, 2009

I was thinking of implementing real time chat using a PHP backend, but I ran across this comment on a site discussing comet:

My understanding is that PHP is a terrible language for Comet, because Comet requires you to keep a persistent connection open to eac browser client. Using mod_php this means tying up an Apache child full-time for each client which doesn’t scale at all. The people know doing Comet stuff are mostly using Twisted Python which is designed to handle hundreds or thousands of simultaneous connections.

View 10 Replies View Related

Real Time Chat With Ajax Polling?

Jun 4, 2010

I need to create a chat similar to facebook chat. I am thinking to use ajax polling ( to send request every 2-3 seconds ). Is this a good approach ? Or I need to use other server side languages like erlang and server-comet ?

View 2 Replies View Related

Homework - Write A Real Time Chat Using XAJAX?

Jun 8, 2009

How can I write a real time chat using XAJAX and PHP?

In other words, is there a way to send xajax responses from the server to multiple clients? Or is the only possibility to check for new messages every few seconds on client side?

View 4 Replies View Related

Real Time Reporting - Display The Most Recent Entry On A Web Page In Real Time

Nov 6, 2009

If I have entries in a mysql db and I want to display the most recent entry on a web page in real time, how would I go about this? Would I have to write a script that queries the database every couple of seconds? Or is there a way to get the database to communicate with a script so that it only gets queried when there is a new entry?

I am just thinking about the best way of not overusing the server by checking every 1-2 seconds. Something a bit like a forum "users currently online are: etc.." but up to date within a few seconds.

View 4 Replies View Related

Getting User's Current Time (not Server Or Computer Clock BUT ACTUAL Real Time) And Pass As A Variable Into It

Aug 3, 2010

EDIT: I'm not sure if this would work but sometimes you get those annoying pop-ups that tell you what city/suburb you're in (usually for dating sites) - could we somehow extrapolate from that data what the time is? Is this data based on a reverse IP lookup??

View 3 Replies View Related

Javascript Real - Time Countdown (count From Start To End Time)

May 29, 2011

I do have the countdown script (see link below) to display the time between current time and the date given in real-time. However, I want to achieve to display the time difference between a given start and end time. Right now, it calculates from the current server time to the end time. I want to be able to set up my own start time and end time. Here is what I have: [URL]

View 1 Replies View Related

Real Time (or Live Time) Clock Only With Pure Script?

May 23, 2010

Is the real time clock possible only with pure PHP rather than PHP and Javascript combination? When I say real time clock I mean  the clock goes by every single second (12:23:32).

View 1 Replies View Related

Unix Time To Real Time

Feb 26, 2011

Not sure whats up with the code

$date = strtotime("%b %d, %Y", $datedata);
$time = strtotime("%I:%M:%S %p", $datedata);

The time i gets from the DB is 1298747601 and is the $datedata I have date_default_timezone_set('America/Los_Angeles'); at the top of the script.

View 2 Replies View Related

Real-time Output?

Jul 27, 2002

I'm a relative PHP newbie, so I apologize if this is a simple question.

Anyway, here's my problem. I'm using a PHP script to pre-render a bunchload of insert files for an HTML page. Right now there's about 1,600, but that number could get much, much higher when the site goes live.

I'll only need to re-render the whole batch once or twice a year (if that) but it's still something I'd like to be able to do in case I have to move the site to a different server, or there's a hard drive crash or etc.

Basically what the script does is grab a whole bunch of information from a database and write the insert file. It does this for every single one.

The problem of course, is that PHP by default does all this server-side, and then sends it to the browser. Because this process takes like ten or twenty minutes to do, the browser times out long before it's finished.

Is there a way to get progressive output with PHP? Or do I need to re-do this in another language like Perl?

View 9 Replies View Related

Real-time Clock

Oct 16, 2005

Where should I start to write a Real-time Clock? I want it be dynamic, not static. I know how to get the time and display it but how do I keep changing it ?

View 1 Replies View Related

Date In Real Time

Aug 3, 2006

It is possible to create a program which get the date in real time using PHP.

View 3 Replies View Related

Real Time Sql Query

Aug 24, 2007

I am making a web-based chat but to get the msg from the database i need to refresh the page and that will make load and extra bandwidth on the server so i want to make the query in real time ( only the new msg to be received without refresh the whole page ), Any one in here knows how to get data from sql database without having to refresh page.

View 3 Replies View Related

Displaying Real Time?

Apr 18, 2011

I am currently displaying date/time on my webpage using the date function PHP provides. However, using this function, the date/time will only be updated when reloading the page. I have the date/time updated every second instead.

View 6 Replies View Related

Run Process In Real Time?

Dec 6, 2010

I'm trying to figure out how to display output (and read input) in real time in a process launched by PHP on the command line. There seem to be many alternatives: shell(), exec(), system(), popen(), proc_open()

and it is not completely clear to me what are the differences. All I need is to execute a process, display its output on the same terminal where the PHP script is invoked, maybe read input and finally return to the PHP script flow when the process exits. Among the options I listed proc_open() is probably able to do this, but it seems overkill, as all I want to do is to give control to an external process and wait for it to finish.

There are some questions which seem related, but as far as I can see they are actually about sending the process in background (which I do not want) or displaying the output in a browser (which is not my case, everything is in a terminal).

View 2 Replies View Related

Real Time Echo'ing Of Var In A Loop

Oct 18, 2003

i have a big loop, and rather then waiting until its done for me too see what happened, every time it runs, how can i get the browser to echo the result, and proceed to keep running the loop.

basically this loop takes a long time to finish, and i had to set my max runtime past 30 seconds. i guess incorporating a refresh of some sort like this would eliminate the need for the time extension too?

View 6 Replies View Related

Real Time Form Update

Nov 14, 2005

i have a script that i wrote for my clan/guild/linkshell in this online game i play that keeps track of members, the points they receive from events, items etc. in the admin panel of the script where you can update peoples points i want to know if i can add a button or something similar that if you push it updates the points which is currently in another text box in the same form in real time.

I'm sorry if i'm not being clear, what i'm trying to do it make it quicker to update a members points because usually after each event they receive either 10 or 20 so i want to add a button where if you push it then it will put 10 or 20 in the 'add' box in real time. right now when you edit a member it shows their current points in a text box and under that two text boxes, one if you want to add points and another if you want to subtract points.

if this isnt possible then i assume that i'd have to make it update the points in the box and keep all the values from before and just reload the page with the new value inside the box. wow, i'm sorry if i'm not very clear, please ask questions if you dont understand what i'm trying to say.

View 4 Replies View Related

Real-time Action Ala Games??

Nov 1, 2005

What would be a proper solution for automated decision making in a PHP script, like a game? That is, without an external application, or any human input. For example, any random event that happens when the player is away from the game. How would one go about implementing that?

View 6 Replies View Related

Real Time Listbox Update

Mar 14, 2007

I have one listbox that I populate with

while($row = mysql_fetch_array($result, MYSQL_ASSOC)

I need to in real time populate another listbox from a related table based on what they have currently selected in the first listbox. Is this possible with php and if so.

View 5 Replies View Related

Real-time File Uploading Through FTP?

Apr 9, 2011

Is it possible to upload a file to the FTP server using PHP script while the same script is downloading the meant file from somewhere else? So at the time script is downloading it should upload the file in real-time.

View 3 Replies View Related

Wordpress - DATETIME To Real Time?

Jul 4, 2011

Getting the time from a Wordpress post (the field being post_date_gmt stored in DATETIME), how can I convert that information (e.g 2011-03-23 20:28:26) to an actual, maleable date in PHP? (like Thursday, March 23rd, 2011)

View 3 Replies View Related

Real Time RSS Display On Web Page?

Jul 7, 2010

i have a php script who parser a rss and give me the data in a know pattern. Im very new with ASP, JavaScript and Jquery. how to autoupdate the script and display the new data with a smooth animation (see this example, that exactly what i want).

View 3 Replies View Related

Make For Loop Real Time?

Apr 23, 2011

I want to Make a Script which give result realtime. In My Script it have 3 steps. 1st step was to grab all links from a webpage .(i use pregmatch_all function coz all links i need are started with same domain [URL]... and grab from [URL]... ) 2nd step i have to grab direct link from all links (like [URL]...) 3rd step Upload that file to and third party site and get the upload link from there . lastly i added a function named which get the page ranges (like '1|5' ) so script upload all links from [URL]... I have done the scipt it was alo running ok but it shows result after all completed but i want a realtime result like script have grabed one link and do all steps with it and show that reult link on browser and then so on i mean a realtime solution. How can i do that i used for loop but no real time result.

View 3 Replies View Related

Storing Real Time Data?

Dec 30, 2009

I am building a website in which the user can select what list items they see in their navigation menu, my idea is to store the menu items that the user selects in a cookie as this will stop the need for the user to be registered member on the website, is it possible to store realtime data in a cookie and how would I do this? For more information the navigation options are built from a mysql result, the then clicks a link and that link is added to a different list, if they click it again it is deleted, I need to add/remove these items from the cookie as the user add/removes it from there list.

View 2 Replies View Related

Generating Link ID's In Real - Time

Feb 14, 2010

This question evolves around the concept of how we can add <a name="id here"></a>'s on a web page to allow a visitor to skip to sections of the page without having to scroll down a lot. I'm thinking about how I could achieve this in PHP. A web page would have various <a name="id here"></a> scattered throughout its length (the longer the page the more there would be) and PHP would simply go from top to bottom and add a numeric value for each one.

Any ideas how you would tackle this one? The ID's could be 0, 1, 2, 3 etc. so the $i = $i++ is fine but it's getting that to paste itself automatically inside of each <a name="id here">. I guess I could just put $i = $i++ after each section then <a name="$i"> however somehow I'm not convinced that's the professional way to go about it.

I'm thinking along the lines of having a function which spits out an ID then preserving the value for the next time it's called, in which case it will simply +1 to the preserved value. The preserved value then is deleted once the function is called the last time on that page so if the page is refreshed it would start from 0 or 1 again. As it's only going to be a few lines of code I don't think there's any concern for server CPU time in this case given it will generate the ID's on each page refresh.

View 8 Replies View Related

Program A Collaborative Real-time Web App?

May 28, 2010

I was wondering if anyone had any good starting points for making a web based app that had Collaborative real-time editing.

The best way I can think of would be to write it with php, mysql and ajax. Where if you edit a block of information in a textbox form, I would then use javascript onBlur or onChange to send an ajax request that then sends a request to a php page that processes the new data and inserts it into mysql.

But how do I get the new information to update on someone else's browser? I could use javascript set_interval to reupdate the textbox every couple of seconds, but that sounds kind of wasteful?

View 4 Replies View Related

Real-time Streaming Of A MP4 File?

Apr 8, 2011

How to play mp4 videos in e.g. flowplayer in real-time (streaming) - without downloading it fully first?

View 2 Replies View Related

Text Being Updated In Real Time?

Jun 27, 2011

I need some text to be updated in real time depending on choices from dropdown boxes.Here's an example:

[code]........

I know how to get an input box automatically updated, using the NAME and ID - but how do you give normal text a NAME and ID?

View 4 Replies View Related

Real-time Streaming Of An MP4 File?

Apr 8, 2011

Is it possible to play the video (mp4) in real time using some flash player? What I mean by in real-time is that player would receive data on the fly, not from alredy saved file but e.g. php script (which sends appropriate content-type header) THAT IS DOWNLOADING AND 'ECHO-ing' THE FILE AT THE TIME PLAYER PLAYS IT - like e.g. some kind of live stream.

View 3 Replies View Related

Display In Real Time Effect?

Jun 5, 2009

how does facebook achieve their 'real time' effect? For instance...it shows 4 New Posts or your notifications as soon as they happen without having to refresh the page. I want to implement this on my website for personal messages and other things. I just have NO idea where to even start

View 3 Replies View Related

Knowing Real Time An User Is In Site?

Jun 1, 2011

I have a website, and I have to implement (with PHP and/or JavaScript) an alert message that triggers two minutes after a visitor has entered the site. I've searched, but all solutions I've found are for an unique page. I need the timer counter to start when the user enters my site, no matter through which page. And I need that counter keeps counting while the user navigates my site's pages.

One solution could be using session variables. I can make a script that looks for this variable, if it doesn't exist means that the user is entering the site. Then I set this variable with current time. The script it's in each page, and it will be reading this variable via AJAX each x seconds and I'll know when the user is in my site since two minutes.

I don't know if it's right or not (I've not implemented yet), but I'm not pretty sure if session is the best way. If the user leaves the page but has other navigator windows opened, the session doesn't expire, and if he enters the site again, the counter will not be reset.

So, two questions:

Is there a better method to have more control on the real entering and exiting? If not, is my above approach right?

View 2 Replies View Related

Flex: Output Of A C File In Real Time?

Oct 31, 2009

I have a C executable (named myprogram). When I run it by ./myprogram I get some output statements on the standard output of my Linux shell. I used run.php to get access to whatever is being printed to the standard output:

#run.php
<?php
$output = shell_exec('./myprogram');
echo $output;
?>

Then I called an HTTPService having id="service" to access this run.php file and I also set the text attribute of a TextArea to {service.lastResult}. When I run my Flex app, the interface kind of halts for a moment and then the TextArea displays all the 20 lines at once.

But if program is run from Linux shell they appear one by one. Is there a way by which I can display a line as soon as it gets printed to standard output? This will then make the TextArea show the output in real time. Or is Flex unable to do this? Rather how can a PHP program achieve such effect i.e. showing, whatever is being printed on standard output, concurrently in the browser in real time?

myprogram outputs 20 lines each after some microseconds. I want only the first line of standard output to appear in TextArea of Flex or in the browser (but in real time) while the program may then continue running the program.

View 3 Replies View Related

Sphinx Real Time Indexes Config?

Apr 22, 2011

i am new to Sphinx i need sample code for real time indexex sphinx.config in linux sever?

View 1 Replies View Related

Real - Time Email Address Validation?

Jun 24, 2009

I am in the process of developing a CMS that is very different from every other CMS. It's based on XSL templating with XSL transformations done at the browser (sometimes at the server if necessary). That's not really the purpose of this post.

One of the features I just wrote is a real-time email address validation.
Basically during the registration the system validates not only the domain name and syntax of the email address but also checks that the mailbox is valid.

So if you enter a fake email address, then the system will detect the bounce while you wait and present an error message. I call it the holy grail of email validation.

Please take a look and tell me what you think:[URL]...Not all features of the site work, also the visual design (css based) is not all that great yet.it's an open source project, so all sources will be available soon.

View 24 Replies View Related

Form Which Generates Image In Real-time?

Jun 24, 2010

I am looking to build a form which updates an image in real-time.

Could someone help me out and tell me the best way to go about creating a form similar to this (languages, techniques, etc): [URL].. Where as you enter details the image is updated accordingly. The form will send to google checkout with the data entered.

View 1 Replies View Related

Python - Creating A Real Time Website?

Apr 14, 2011

I'm currently creating a website using PHP and the Kohana framework.I want to site to be able to use real time (or near real time) data (e.g. for chat and real time feeds).I need it to be able to scale to thousands of concurrent users. I've done a lot of reading and still have no idea what the best method is for this. Does anyone have any experience with StreamHub? Is it possible to use this with PHP?

Am I digging myself into a hole here and need to switch languages? I've looked at node js and nowjs, but I'm weary about coding a while site in Express (I wonder about security holes, code maintainability, lack of a good ORM). I've read about Twisted Python, but have no idea what web framework would work well on top of that, and I'd prefer not to use Nevow - maybe Django can be used well with Twisted Python? I'm just looking to be pointed in the right direction, so I don't go too far in PHP and realize I can't get the near real-time results that I need.

View 2 Replies View Related

Amazon SimpleDB And Updates Not In Real Time?

Jan 4, 2011

Amazon SimpleDB (using Rick Helms' PHP API) and noticed that the updates are not in real time.if in the same page contact the service to delete and item and the retrieve the items list, the deleted item is often still there.

View 2 Replies View Related

Best Language For Real Time Analytics Website?

Jul 6, 2011

I'm developing an app that is essentially going to pull data from a ton of different sources (twitter, facebook, github, basecamp, stackoverflow, etc.) and aggregate it all into a useful interface. Everything is going to need to be real-time.I'm thinking that the majority of the app will avoid database usage - so the data I pull isn't going to be stored, it'll just be repulled and formatted everytime a user needs it.bviously there is going to be a lot of AJAX involved and a lot of grabbing data from different APIs.I'm most skilled in PHP, but I often times find it to be clunky, especially with this sort of thing. What language orframework would be the cleanest for pulling this kind of data so often, and quickly parsing it for the user? I know my way around Node.js and Ruby, but am very open to learning a new language/framework if need be.

View 1 Replies View Related

Real Time Retrieval And Storage Of Data?

Apr 24, 2011

I am writing a quiz script and I need to send and receive data from database on a timeout basis and I also want that when time finishes (of quiz) user must be moved to some other page. I basically need timeout based function if there are any and real time retrieval and storage of data.

View 1 Replies View Related

Read Data From MS Access Into MySQL In Real-time

Nov 29, 2001

I am currently working on a project that involves reading information from a inventory system into Access via ODBC and display the info on the web site using MySQL.

I would like to create a live link between the MS Access(local) and MySQL (remote) whenever the inventory system is updated MySQL will be updated as well.

I know that MyODBC will let me do the opposite of what I would like to accomplish by reading data in MySQL into Access. Is it possible to do the reverse way.

View 2 Replies View Related

How Can One Get Real Time Stock Quotes For An Online-community?

Jan 4, 2007

For one of our web-communities we plan an offer of real time stock
quotes incl. advanced notification services. I have the following
questions:

- Do you know of any services, that already offers such services in a
decent way?

And more important:
- Does anybody know a provider of such services, that offers a
real-time stock quote data stream for such a usage at a decent price? I
only know of Deutsche Börse offering it for 1&#39400; Euro per month. That
is too expensive for us.

View 5 Replies View Related

Real-time Statistics: MySQL(/Drizzle) Or MongoDB?

Apr 29, 2011

We are working on a project that will feature real-time statistics of some actions (e.g. clicks).
On every click, we will log information like date, age and gender (these come from Facebook), location, etc.

We are discussing about the best place to store these information and use them for real-time stats. We will display aggregate statistics: for example, number of clicks, number of clicks made by male/female, number of clicks divided by age groups (e.g. 18-24, 24-30...).

Since on the site we are using MongoDB everywhere, my colleague thought we should store statistics inside it as well.I, however, would prefer a SQL-based database for this task, like MySQL (or maybe Drizzle), because I believe SQL is better when doing operations like data aggregation. Although there's the overhead of parsing the SQL, I think MySQL/Drizzle may actually be faster than No-SQL databases here. And inserts are not slow too, when using INSERT DELAYED queries.

Please note that we do not need to perform JOINS or collect data from multiple tables/collections. Thus, we don't care if the database is different.However, we do care about scalability and reliability. We are building something that will (hopefully) become very big, and we've designed every single line of code with scalability in mind.

What do you think about this?Is there any reason to prefer MongoDB over MySQL/Drizzle for this? Or is it indifferent?Which one would you use, if you were us?

View 2 Replies View Related

Android Timestamps To Real Time In Minutes And Seconds?

Mar 19, 2011

I have about 1000 Android generated timestamps in a text file. Now, I need to check if the difference between two consecutive timestamps is lesser than threshold value. If yes, I need to add this TIME in MINUTES to a variable continously... If not, add the time in MINUTES in another variable...

How do I convert the timestamps into actual time . ONLY using PHP ! Or is there another way to do this without converting it to time? (because timestamps are random, just adding the consecutive differences does not help )

View 1 Replies View Related

Technology Use To Make A Webpage To Update In Real Time?

Apr 17, 2011

I want to make a webpage where an user can add the title from a book he has read. These changes are reflected in real time on a list that contains all books he has introduced on the database, without the need to press any "reload" button. By example: there is no need to refresh (F5) the page to see the last book added.

I don't know if I can do this in PHP or in any other language, so I would like to know which is the best suited for something like this.

View 2 Replies View Related

Unix To Real Time - Convert X Minutes And X Seconds?

Jun 29, 2010

I have a code that gives me a unix time ie)1277851200 How would i be able to convert that to x minutes x seconds and so on. (real time)

View 4 Replies View Related

ADVERTISEMENT