fn_do_submit_post($url,$arr_post); function fn_do_submit_post($posting_url, $arr_post){ echo “<form action=’$posting_url’ method=’post’ name=’frm’>”; foreach ($arr_post as $a => $b){ echo “<input type=’hidden’ name='”.htmlentities($a).”‘ value='”.htmlentities($b).”‘>”; } echo “</form>”; echo “<script type=’text/javascript’>”; echo “document.frm.submit();”; echo “</script>”; }
Linux Looping Command Line
while (true); do date; ps -eaf | grep httpd | wc -l; sleep 1; echo -e “\e[3A\r”; done; So let me explain the code above So basically its looping a bunch of code , and this script is to grep total count of httpd worker and printing it over and over every second. So what […]
Array Difference Between Large Arrays (PHP)
Hi, today i’ve encounter a two large array to be compare. Array 1 is around 50k data and Array 2 is around 500k data. So what i wanna eliminate is , If Array2’s data exist in Array1 , i want it out from Array 2. So here’s what i will normally do (SLOW VERSION 🙁 […]
Git add recursively for specific extension only
find . -name ‘*.java’ -print0 | xargs -0 git add
How to Prevent Web Attack: Jorgee Vulnerability Scanner
Recently i’ve added a few method of blocking some ip and user agent for my server. For my server , i am using nginx as my web server. What is Jorgee Vulnerability Scanner?Here are some example of Jorgee Vulnerability Scanner. 46.142.55.116 – – [11/Sep/2017:22:02:10 +0000] “HEAD http://198.167.140.231:80/mysql/admin/ HTTP/1.1” 404 0 “-” “Mozilla/5.0 Jorgee” 46.142.55.116 – […]
FullCalender.io (Nice & Convinient Plugin for Calender Events Handling )
https://fullcalendar.io/
Aws CLI credentials and configuration settings (Keys)
For AWS CLI credentials , there are different ways that aws cli will find for credentials. Based on this link, There are 6 ways in total for now, who knows future there will be more secured way to using CLI. For this example , i will talk about how to import keys but using the […]
AWS SDK (PHP)
Hi, Today i am gonna talk about how to use SDK provided by aws (PHP). For aws SDK, they support few kind of languages such as Php, Android, IOS , Java, Python. For all the available language for sdk , Click Here You will have to import aws sdk files there are three kind of […]
Server & Sql Monitoring (PMM-Server)
Hi, i’ve recently created a pmm-server ( monitoring system for server & mysql ). A pmm-server act as a server and client can connect to pmm-server to look on their information by using the command pmm-admin. For more info Click in this link https://www.percona.com/doc/percona-monitoring-and-management/deploy/server/index.html Setup SMTP server For this example you can refer to […]
LazyLoad (Nice & Convinient Plugin for delay Image Load ) (Save bandwidth)
https://appelsiini.net/projects/lazyload/