Automatic Update the number of lines in txt file
$10-30 USD
Paid on delivery
I'm currently working on a website. There is a page with the codes below and what it does is just output/showing/counting the number of lines in a specific text file.
I want the code below able to update automatically in the webpage without having to refresh the webpage, (let say if I open that textfile and remove 1 line from it, at the same time the number of lines shown in the webpage is also updated automatically without having to refresh it)
I believe AJAX jquery is the answer on how to solve this?
Code:
<?php
$file = basename($_SERVER['PHP_SELF']);
$no_of_lines = count(file($file));
echo "There are $no_of_lines lines in $file"."\n";
?>
Output:
There are 5 lines in [login to view URL]
Project ID: #16587354
About the project
15 freelancers are bidding on average $22 for this job
Yes without AJAX JQuery we can't solve this. because if you need data without page refresh complasary to use ajax. message me to discuss more. thanks mukesh
Hi I can do the job to count number of lines in file in 1 hour. Please share me more details. I have 8 years experience in PHP development. Thanks
Hi, PHP can not dynamically do what you need. You have to use jQuery : Use setInterval to redo things in a loop having certain time gap. And use .load() to load the text file. Regdards, Ozzy
Hi, I can do it. My experience on web-dev more then 7 years! ''''''''''''''''''''''''''''''''''''''''''''''''''''
Hello Sir, I read through the details extremely carefully. I am having experience from past 5+ years. Looking forward from your end. Thanks
Hi, I can modify your existing PHP Code to Auto Update File line count without page refresh. If you prefer me to do the job kindly award me the project. I can provide the code in some time. Thanks
Hello Sir, Your project interests me. I will be available to participate in its realization. for more information contact me Zakariaa BENSLIMANE Relevant Skills and Experience Hello Sir, Your project interests me. I w More
hi the script is : $lines = count(file('path_file')); echo $lines; contact me if you have dificulties thank you.
Hello, do you use any framework in your website? I guarantee that you will find quality in work. I am new in freelancer but i'm Experience in web developing and AJAX. I have worked locally in web developing in se More