Articles Comments

{ Berbagi, Menulis, Dan Mengajar } Ilmu… » 4. Programming / IDE

Check State Status FTP

Berikut ini adalah sebuah simple script untuk melakukan status state terhadap sebuah protokol tcp/ip, pada tulisan yang sederhana ini ditampilkan sebuah contoh program untuk melakukan cek state protokol dari FTP port. untuk protokol program yang lain bisa dikembangkan sendiri — .::. www-data@ptpn-xi:~$ // simple Script for checking FTP status // if the FTP port is going “ESTABLISHED” don’t change user or group, because somebody // has being transfer file via FTP client // by .:dms:. function check(){ $ftpcheck = exec(”netstat -na | grep :21 | grep ESTABLISHED | grep -v grep | awk ‘{ print $1}’”); if($ftpcheck!=””) { print(”port FTP sedang berjalan \n”); } else { print (”Lakukan Pengubahan User Dan Group \n”); exec(’/bin/chown -R www-data.www-data ~ras/public_html/’); exec(’/bin/chown -R www-data.www-data ~data/public_html/’); } } check(); ?> — .:GoodLuck:. … Read entire article »

Filed under: PHP-Script