Most efficient way to list server status results [closed] - php

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm trying to determine the best way to show server status results.
We have roughly two dozen websites and services to maintain, and the old system they had here was crude (HTML, manual color change to reflect status), and I'm trying to re-vamp it a little.
What would be the best method for doing a simple heartbeat ping to an internal service, while cleanly listing them.
Also, has to be compatible with Sharepoint.
I've read that PHP is the baseline for this, but I can't find much in the way of a continuous ping/health monitor.

This would need to be done client side, with an AJAX query to a script that runs the ping/heartbeat check code. With a callback that updates the status, based upon the ID.
Using setInterval () will enable you to execute this on a regular basis, without requiring manual input.
Note that if you need to create such a system that can be opened from many clients, you might want to look into caching the heartbeat check result on the server side. To prevent self-flooding of the servers.

Related

How do I program this thing (extract data from other website) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am a union member of a airlines company, and I possess the elementary level of HTML, PHP and MYSQL. I have experience programming a library system and personnel system.
Our union would like to create an online platform, one of the function is to allow our crews to calculate their flying allowances and salary easily.
I think first of all, I need the roster data, so the platform is required to log in my company website in order to extract the roster data, and then I can code with PHP.
Therefore, I wonder if it is possible to write PHP code "log in to my company website and extract the data".
Or what is the best language for this program you recommend? Maybe I can learn a new language if PHP is not applicable.
Thanks for your attention.
Welcome to Stack Overflow.
To answer your question, Yes, you can write this in PHP. And by you, I mean you! None of us know the site and there is no way for us to know how it operates.
You may want to consider if there is an API for this site. You may want to load the site via cURL or another HTTP request into PHP and parse the HTML. There are a lot of ways to do this.
PHP is not the only language to perform this in: ASP.NET, Perl, Python... in the end, it sounds like you need to collect data that you would normally see using a web browser, so you're going to mimic that behavior with whatever language you choose to use.

What is the best way to build a validator function? PHP [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I have many forms and was wondering wouldn't it be better to build a function that validates user entries?
So for example we would forward the data into the function and it would return whatever and display a message with an error but i have no idea how to go about this since i am new to PHP. I don't even know if this is the best way to go about my problem.
Any tutorials or tips for validating lots of forms? Best practices?
BTW i have to avoid using external libraries. So creating simple code is the way forward.
Your modular approach is good. But I think having a common function for multiple page validation might lead to unnecessary execution of multiple instructions failing the actual purpose of using it. So you would basically be trading off on performance for code optimisation.
In case your pages are more or less similar in terms of the data accepted, you can always invoke the same function and pass it a parameter which indicates the page from which it has been invoked and based on that you can parse and hence validate the data received.

Facebook-like comment refresh system? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I've recently built a simple messaging system for some work colleagues and I am currently working on optimizing current functionality. Many users are complaining of a messy-looking message display system.
The thing that I currently have in place is a PHP file inside of an iFrame that refreshes every 15 seconds. However this is undesirable and wastes resources.
As a result I was wondering if there are any tutorials out there that propose better methods, similar to those used by Facebook whereby the comment is automatically loaded upon posting.
http://ajaxim.com/ <-- Ajax Instant Messaging framework. :)
EDIT :
You might also want to try this http://www.smashingmagazine.com/2012/05/09/building-real-time-commenting-system/ which is a good that guides you through making a realtime comment system.
That system is built using HTML 5. (PHP and Ajax too of course) And it's using Websockets :)
Oh, and a link to a previously asked question that is similar:
Instant notification using php/mysql,please give me a general idea

MySQL : Monitor Queries [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am trying to understand a PHP - MySQL project. The Project is quite complex so exploring it line by line is quite impossible.
What I want to do is, compare the instances of a MySQL database.
Say,
1) MySQL is up and running. This is instance number one of the database.
2) A user logs in from PHP front end, and then logs out.
3) This is instance number two of the database.
I need to see what changed between instance one and instance two, in a friendly way.
Any suggestions regarding open source tools or any other techniques?
You could use mysqldump to take a snapshot of the database, do your login/log out and then dump the database again and use a tool like diff or winmerge to compare the changes.
You could also turn on full query logging in mysql - this is just a single line to the config - http://dev.mysql.com/doc/refman/5.1/en/query-log.html

Looking for a Q&D PHP SQLite editing solution [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Here's what I need: I have a table in a SQLite file, that contains items - descriptions, dimensions, image and thumbnail.
I need to allow someone from outside the company to edit this table through an "admin interface". I need a simple login mechanism to authenticate said user, and I need a form that shows all available rows in the table applicable to him/her, and allow editing the values. That may include uploading images.
Now, I've developed tons of these interfaces before, in several languages. What I'd like to ask is: is there a shortcut? Since this needs to be quick and dirty (i.e., this wasn't in the original plan, I'm not being paid for this, but I may lose a client if I don't have it in place) and be up as soon as possible, is there some open source solution, or any previous PHP code, that I can customize and use in this and future cases?
Any solution that will save me time is welcome.
Thanks for YOUR time :)
Guy
Well if you can use a framework you could use an auto generated admin interface or scaffolding from a framework. Symfony and Cake both have this. Of course thats a lot of dead weight to have if the whole app/site isnt using the framework. But it would make it relatively painless to create. IF you can run this interface on a subdomain that would make it even esier since you dont have to worry about integrating it with anything existing except the DB and shared folder for the uploaded files.

Categories