Ignotas Posted June 21, 2013 Share Posted June 21, 2013 HelloI'm just starting working with web pages and I have an assinment for work to make web application (if you could call it that way) which has to take .txt file from one server then sort data which is in it and then display it on the web page. The data looks like this:2013.5.14 00:03:22;"555000000000000000";22;"ANSWERED". I have to take data lines only from certain date, delete numers which repeat, count their call duration, average call duration and display it on the web page. My question is can make such sorting with Php ? Or can I run programm in server, on click of the button on web page, which would sort it and put it on .txt file from which the page would read it and then display it? Or can I put c++ code inside the web page ? Thank you for any help! Link to comment Share on other sites More sharing options...
thescientist Posted June 21, 2013 Share Posted June 21, 2013 you can use PHP. Link to comment Share on other sites More sharing options...
Ignotas Posted June 21, 2013 Author Share Posted June 21, 2013 So it's not possible to start a programm in server and then take sorted data from .txt file ? Becouse I already have a programme I only need to make few cganges to it. Link to comment Share on other sites More sharing options...
thescientist Posted June 21, 2013 Share Posted June 21, 2013 you probably could, but since you posted in a PHP forum and asked if it could be done with PHP, I was saying that yes, it could do it. PHP can do all the things you are asking about. Link to comment Share on other sites More sharing options...
justsomeguy Posted June 21, 2013 Share Posted June 21, 2013 You can either configure the web server to run your program when it receives certain requests, or you can use PHP to execute the program via a command line and return the output. Link to comment Share on other sites More sharing options...
Ignotas Posted June 22, 2013 Author Share Posted June 22, 2013 Thank you your answers, I think I'll try doing with PHP. And is there any PHP library or chapter for working with text and files ? Link to comment Share on other sites More sharing options...
birbal Posted June 22, 2013 Share Posted June 22, 2013 http://www.php.net/manual/en/book.strings.phphttp://www.php.net/manual/en/refs.fileprocess.file.phphttp://php.net/spfileobject Link to comment Share on other sites More sharing options...
Ignotas Posted June 22, 2013 Author Share Posted June 22, 2013 Thanks ! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now