date_default_timezone_set('UTC'); while(1){ $seconds=date('s'); if($seconds ==' 00'){ while(1){ echo date("d/M/Y:H:i:s")." Current Time\n"; $seconds=date('s'); $first_digit_of_second=substr($seconds, 0, 1); $past_second=$first_digit_of_second -1; if(($past_second >= 0) and ($past_second <= 5)) { $mod_date=date("d/M/Y:H:i"); $mod_datetime="$mod_date:$past_second"; $OUT=exec("/usr/bin/tail -n1000 /var/log/httpd/ssl_access_log | grep $mod_datetime | wc -l"); echo "Current Users on xxx.com\n".$OUT; echo "\n"; } else: echo "Check SSL_access_log file for details\n"; sleep(10); } } sleep(1); }
want same code in python
want same code in python
|
Nov-22-2019, 06:46 AM
Just posting some php code won't work.
Explain what your goal is, post your python code (in python tags). Ask specific questions. If you get any error - post full traceback in error tags. If you just looking for someone to write code for you - this should be in JOBS section (check what to include in posts in JOBS section). Let me know if you want to move this thread in JOBS section of the forum.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link Create MCV example Debug small programs |
|
Users browsing this thread: 2 Guest(s)