1

My apologies in advance as this may be lengthy.

I'm trying to determine if what I need is socket programming or some other technology.

  • I have a web site/app that acts as a dashboard.
  • I have a database that holds the data for the web app.
  • I have a script to retrieve data and insert it into the database.

What I'd like to do is have the web app automatically update as new data is inserted into the database. My limited understanding leads me to believe that socket programming could accomplish this but I can't find answers to my questions (perhaps because I don't know where to look).

So, with that said, here are my questions:

  • Can socket programming with PHP accomplish this?
  • Can the server that hosts the web app and database be the socket server and client?

Any resources that you could direct me to would be great and much appreciated. I've read the basics on php.net and a few blog posts but nothing very in depth.

asked Jul 21, 2012 at 5:48
2
  • 1
    Look into websockets, long polling, comet, etc... Commented Jul 21, 2012 at 5:58
  • 1
    take a look at this stackoverflow.com/questions/2588604/… Commented Jul 21, 2012 at 6:00

1 Answer 1

1

You should avoid opening a second custom socket in a webapp. Since it requires you to set up port forwarding and firewall rules to get it running.

You should look for WebSocket, polling or long-polling.

answered Jul 21, 2012 at 6:01
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.