PHP – AJAX and MySQL

Sumber http://www.w3schools.com/php/php_ajax_database.asp

 

AJAX can be used for interactive communication with a database.

 

Contohnya dapat dilihat di http://www.w3schools.com/php/php_ajax_database.asp

 

When a user selects a user in the dropdown list above, a function called “showUser()” is executed. The function is triggered by the “onchange” event:

<html>
<head>
<script type=”text/javascript”>
function showUser(str)
{
if (str==”")
{
document.getElementById(“txtHint”).innerHTML=”";
return;
}
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject(“Microsoft.XMLHTTP”);
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById(“txtHint”).innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open(“GET”,”getuser.php?q=”+str,true);
xmlhttp.send();
}
</script>
</head>
<body>

<form>
<select name=”users” onchange=”showUser(this.value)”>
<option value=”">Select a person:</option>
<option value=”1″>Peter Griffin</option>
<option value=”2″>Lois Griffin</option>
<option value=”3″>Glenn Quagmire</option>
<option value=”4″>Joseph Swanson</option>
</select>
</form>
<br />
<div id=”txtHint”><b>Person info will be listed here.</b></div>

</body>
</html>

The showUser() function does the following:

  • Check if a person is selected
  • Create an XMLHttpRequest object
  • Create the function to be executed when the server response is ready
  • Send the request off to a file on the server
  • Notice that a parameter (q) is added to the URL (with the content of the dropdown list)

The PHP File

The page on the server called by the JavaScript above is a PHP file called “getuser.php”.

The source code in “getuser.php” runs a query against a MySQL database, and returns the result in an HTML table:

<?php
$q=$_GET["q"];

$con = mysql_connect(‘localhost’, ‘peter’, ‘abc123′);
if (!$con)
{
die(‘Could not connect: ‘ . mysql_error());
}

mysql_select_db(“ajax_demo”, $con);

$sql=”SELECT * FROM user WHERE id = ‘”.$q.”‘”;

$result = mysql_query($sql);

echo “<table border=’1′>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
<th>Hometown</th>
<th>Job</th>
</tr>”;

while($row = mysql_fetch_array($result))
{
echo “<tr>”;
echo “<td>” . $row['FirstName'] . “</td>”;
echo “<td>” . $row['LastName'] . “</td>”;
echo “<td>” . $row['Age'] . “</td>”;
echo “<td>” . $row['Hometown'] . “</td>”;
echo “<td>” . $row['Job'] . “</td>”;
echo “</tr>”;
}
echo “</table>”;

mysql_close($con);
?>

Explanation: When the query is sent from the JavaScript to the PHP file, the following happens:

  1. PHP opens a connection to a MySQL server
  2. The correct person is found
  3. An HTML table is created, filled with data, and sent back to the “txtHint” placeholder

 

 

Leave a Comment

How to export table structure of MS Access Database

Bagaimana mengekspor struktur tabel dari Database MS Access

 

  1. Open MS Access and open your database. (For this sample the CarsDB.MDB sample database installed with ASPxperience was used)
  2. Press ALT+T+Y+D to open the Documentor. (This is a legacy menu option that still works as long as you know the shortcut)
  3. Click the Table tabs
  4. In the Documentor Table tab check the Cars and CarScheduling tables (see Figure 1)
  5. Click the Options button
  6. In the Include for Table group check Properties only
  7. In the Include for Fields group select the Names, Data Types, and Sizes radio button
  8. In the Include for Indexes group select the Nothing radio button (see Figure 2).
  9. Click OK to close the Print Table Definition dialog
  10. Click OK to generate the documentation
  11. When the documentation report is finished the Print Preview tab will be displayed. Click Text File in the Data section to export the report to a text file
  12. In the Export – Text File dialog (see Figure 3)
  13. Check open the destination file after the export operation is complete
  14. Click OK
  15. For the encoding choose Windows default

Leave a Comment

How to list all table names in ms access

Cara pertama:

SELECT MSysObjects.Name FROM MSysObjects WHERE (((MSysObjects.Flags)=0) AND ((MSysObjects.Type)=1)) ORDER BY MSysObjects.Name

Cara kedua:

SELECT Name
FROM MSysObjects
WHERE
Left([Name],1)<>”~”
AND
Left([Name],4)<>”MSys”
AND
Type In (1,4,6)
ORDER BY Name;

Leave a Comment

Bagaimana mengedit VIEW melalui phpMyAdmin

  1. Jalankan kueri berikut : SHOW CREATE VIEW nama_view_anda
  2. Klik “Options” untuk melihat pilihan, dan pilih Full Texts
  3. Klik Go
  4. Copy seluruh isi kolom Create View .
  5. Buat perubahan sesuai yang diinginkan menggunakan editor
  6. Jalankan kueri tersebut.
  7. Jika sudah sesuai, klik CREATE VIEW .
  8. Centang pada OR REPLACE .
  9. Pada VIEW name isikan nama view yang akan diupdate.
  10. Klik Go

Leave a Comment

Install Xampp di ubuntu

Sumber : http://lasmedi.wordpress.com/2009/01/13/install-xampp-di-ubuntu/

Dalam Komputer, Linux, Serba Serbi pada Januari 13, 2009 oleh lasmedi
Iseng-iseng nyoba install xampp di ubuntu, Awalnya download master xampp di http://www.apachefriends.org/download.php?xampp-linux-1.7.tar.gz, setelah didownload tinggal proses instalasi. Untuk instalasi xampp sedikit berbeda ketika kita install di windows, pada ubuntu langkah awal yang harus kita lakukan adalah mengocy master xampp ke direktori /opt.
setelah di copy langkah selanjutnya adalah mengekstrak master xampp, ketikkan perintah seperti dibawah ini

tar -xvf xampp-linux-1.7.tar.gz

apabila sudah diekstrak maka kita tinggal menjalankan service dari xampp dengan mengunakan perintah seperti ini

/opt/lampp/lampp start

service xampp berhasil dijalankan. Jika kita ingin service xampp berjalan secara otomatis tinggal tambahkan perintah dibawah ini didalam file

/etc/rc.local

/opt/lampp/lampp start

Leave a Comment

Linux console command

Linux console command

sudo gedit namafile.php

sudo tar xvfz filezip.tar.bz2 -C /opt (lihat: xampp linux download and installation)

cp -r /file/dari/ /file/tujuan/

chmod -R 777 /file/system/

enable SSH di ubuntu 1..04

http://www.liberiangeek.net/2011/04/enable-secure-shell-ssh-ubuntu-11-04-natty-narwhal/

sudo apt-get install openssh-server

install MC midnight commander
sudo add-apt-repository ppa:webupd8team/unstable && sudo apt-get update
sudo apt-get install mc

install FTP
sudo apt-get install vsftpd

https://help.ubuntu.com/6.06/ubuntu/serverguide/C/ftp-server.html

iftop monitoring
apt-get install iftop
sudo iftop -BP -i eth0

tcpdump

cpu monitoring

memory ram monitoring

Leave a Comment

Instalasi iftop di CentOS

Secara mudah, instalasi di CentOS dapat menggunakan perintah

#yum install iftop

maka akan otomatis yum mencari software iftop dari repository.

Kalau repository gagal, maka perlu diubah ke server yang menyediakan repositori. Untuk mengubah repositori dan menginstall iftop. Diambil dari sumber : http://aceh.linux.or.id/linceh/?tag=centos

 

Update Yum.repos.d

kebetulan salah satu server (dvb-server centOS 4) di tempat kerja aku belum terinstall Iftop, karena perintah dari atasan aku pun segera meremote server tersebut dan langsung mengetik #yum -y install iftop , ini mungkin karena kebiasaan menggunakan ubuntu jadi semua serba apt-get install , gak model nyari-nyari manual diinternet pake google atau cari situs yang bersangkutan kemudian download aplikasinya lalu install. **Mode: pemalas :D **

Tapi apa yang terjadi setelah perintah #yum -y install iftop aku ketik dan aku enter, si server pun mulai sibuk nyari sana-sini..pontang panting ngikutin repository server nya kemudian didetik terakhir muncul status :

Parsing package install arguments
No Match for argument: iftop
Nothing to do

Dasar Repository geblek, belum terupdate rupanya. itu aja nyerah.. oh tidak.. barulah aku buka mozilla firefox kemudian dengan perasaan agak sedikit malu aku ketik http://google.com dan aku search reposiry centos dan ternyata tidak sia-sia aku dapatin repository extra di link http://centos.karan.org/. aku ngambil repository yang isinya :

# All new packages are now released to the testing repository first
# and only moved into Stable after a period of time
# Note: The testing repository is disabled by default

[kbs-CentOS-Extras]
name=CentOS.Karan.Org-EL$releasever - Stablegpgcheck=1
gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
enabled=1
baseurl=http://centos.karan.org/el$releasever/extras/stable/$basearch/RPMS/

[kbs-CentOS-Testing]
name=CentOS.Karan.Org-EL$releasever - Testing
gpgcheck=1
gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
enabled=0
baseurl=http://centos.karan.org/el$releasever/extras/testing/$basearch/RPMS/

Script diatas aku copykan (tambahkan) ke reposiry server ku di :

[root@dvb-gw ~]# vim /etc/yum.repos.d/CentOS-Base.repo

Kemudian aku simpan dan keluar dengan perintah :wq

dan aku harus mengupdate nya

[root@dvb-gw ~]# yum update

selesai deh..sekarang tinggal install iftop nya:

[root@dvb-gw ~]# yum -y install iftop

sekarang tinggal ambil segelas kopi + sebatang rokok (tapi aku gak merokok) :) . tunggu sampe siap install…

oya..ditulisan ini aku hanya mensampelkan pada aplikasi iftop.. tapi yang sebenarnya aku lebih mentitik beratkan di update YUM nya, jika teman-teman ingin menginstal aplikasi lain dengan cara menggunakan perintah yum, silahkan saja.. :D

Leave a Comment

Mendeteksi Port Scaning dengan NMAP dan TCPDUMP

Komputer yang Digunakan
Pada pengerjaan tugas “Mendeteksi port scanning” ini saya menggunakan dua komputer server yang memiliki IP publik 118.98.221.204 dan 118.98.221.205.

Skenario Deteksi Port Scanning
Skenarionya adalah sebagai berikut:
- Server 118.98.221.204 akan melakukan port scanning kepada server 118.98.221.205 menggunakan nmap
- Server 118.98.221.205 menggunakan tcpdump akan memantau paket dari 118.98.221.204 yang melakukan port scanning

Sintaks/Perintah yang Digunakan
Sintaks yang digunakan adalah sebagai berikut
- Dari server 118.98.221.204 adalah: nmap 118.98.221.205
- Dari server 118.98.221.205 adalah: tcpdump -n – i eth0 src 118.98.221.204

Hasil nmap dari server 118.98.221.204 adalah sebagai berikut:

[root@118.98.221.204 ~]# nmap 118.98.221.205

Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2010-10-31 09:39 WIT
Interesting ports on 118.98.221.205:
Not shown: 1665 closed ports
PORT STATE SERVICE
1/tcp open tcpmux
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
53/tcp open domain
80/tcp open http
110/tcp open pop3
111/tcp open rpcbind
143/tcp open imap
465/tcp open smtps
993/tcp open imaps
995/tcp open pop3s
3306/tcp open mysql
8009/tcp open ajp13
10000/tcp open snet-sensor-mgmt
MAC Address: 00:1E:0B:75:C7:AC (Unknown)

Nmap finished: 1 IP address (1 host up) scanned in 1.173 seconds

Hasil tcpdump dari server 118.98.221.205 adalah sebagai berikut:

09:07:35.232132 IP 118.98.221.204.51659 > 118.98.221.205.252: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.232173 IP 118.98.221.204.51659 > 118.98.221.205.845: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.232213 IP 118.98.221.204.51659 > 118.98.221.205.nnsp: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.232249 IP 118.98.221.204.51659 > 118.98.221.205.dlip: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.232277 IP 118.98.221.204.51659 > 118.98.221.205.soap-beep: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.232308 IP 118.98.221.204.51659 > 118.98.221.205.6008: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.232351 IP 118.98.221.204.51659 > 118.98.221.205.dbstar: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.232395 IP 118.98.221.204.51659 > 118.98.221.205.marcam-lm: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.232431 IP 118.98.221.204.51659 > 118.98.221.205.tr-rsrb-p2: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.232467 IP 118.98.221.204.51659 > 118.98.221.205.datex-asn: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.232491 IP 118.98.221.204.51659 > 118.98.221.205.netrjs-4: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.232527 IP 118.98.221.204.51659 > 118.98.221.205.omginitialrefs: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.232571 IP 118.98.221.204.51659 > 118.98.221.205.mptn: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.232619 IP 118.98.221.204.51659 > 118.98.221.205.discp-client: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.232659 IP 118.98.221.204.51659 > 118.98.221.205.audio-activmail: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.233491 IP 118.98.221.204.51659 > 118.98.221.205.obex: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.233515 IP 118.98.221.204.51659 > 118.98.221.205.vslmp: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.233537 IP 118.98.221.204.51659 > 118.98.221.205.cal: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.233560 IP 118.98.221.204.51659 > 118.98.221.205.fc-cli: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.233583 IP 118.98.221.204.51659 > 118.98.221.205.commplex-main: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.233642 IP 118.98.221.204.51659 > 118.98.221.205.shrinkwrap: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.233691 IP 118.98.221.204.51659 > 118.98.221.205.hpstgmgr: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.233720 IP 118.98.221.204.51659 > 118.98.221.205.hp-managed-node: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.233750 IP 118.98.221.204.51659 > 118.98.221.205.afs3-errors: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.233779 IP 118.98.221.204.51659 > 118.98.221.205.272: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.233823 IP 118.98.221.204.51659 > 118.98.221.205.cisco-sys: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.233866 IP 118.98.221.204.51659 > 118.98.221.205.932: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.233903 IP 118.98.221.204.51659 > 118.98.221.205.gv-us: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.233938 IP 118.98.221.204.51659 > 118.98.221.205.sql*net: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.233964 IP 118.98.221.204.51659 > 118.98.221.205.profile: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.234000 IP 118.98.221.204.51659 > 118.98.221.205.namp: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.234047 IP 118.98.221.204.51659 > 118.98.221.205.5900: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.234090 IP 118.98.221.204.51659 > 118.98.221.205.osm-oev: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.234131 IP 118.98.221.204.51659 > 118.98.221.205.974: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.234167 IP 118.98.221.204.51659 > 118.98.221.205.timbuktu-srv3: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.234199 IP 118.98.221.204.51659 > 118.98.221.205.954: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.234227 IP 118.98.221.204.51659 > 118.98.221.205.imaps: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.234270 IP 118.98.221.204.51659 > 118.98.221.205.ivsd: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.234315 IP 118.98.221.204.51659 > 118.98.221.205.dsfgw: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.234357 IP 118.98.221.204.51659 > 118.98.221.205.imaps: R 3235918386:3235918386(0) win 0
09:07:35.234361 IP 118.98.221.204.51659 > 118.98.221.205.1001: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.234398 IP 118.98.221.204.51659 > 118.98.221.205.971: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.234433 IP 118.98.221.204.51659 > 118.98.221.205.dcs: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.234455 IP 118.98.221.204.51659 > 118.98.221.205.bpjava-msvc: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.234500 IP 118.98.221.204.51659 > 118.98.221.205.ariel3: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.234532 IP 118.98.221.204.51659 > 118.98.221.205.insitu-conf: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.234585 IP 118.98.221.204.51659 > 118.98.221.205.cryptoadmin: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.234621 IP 118.98.221.204.51659 > 118.98.221.205.714: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.234661 IP 118.98.221.204.51659 > 118.98.221.205.4998: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.234696 IP 118.98.221.204.51659 > 118.98.221.205.dantz: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.234726 IP 118.98.221.204.51659 > 118.98.221.205.mumps: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.234757 IP 118.98.221.204.51659 > 118.98.221.205.eicon-server: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.234793 IP 118.98.221.204.51659 > 118.98.221.205.1002: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.234843 IP 118.98.221.204.51659 > 118.98.221.205.ttyinfo: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.234884 IP 118.98.221.204.51659 > 118.98.221.205.856: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.234924 IP 118.98.221.204.51659 > 118.98.221.205.338: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.234964 IP 118.98.221.204.51659 > 118.98.221.205.qmqp: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.234988 IP 118.98.221.204.51659 > 118.98.221.205.cimplex: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.235020 IP 118.98.221.204.51659 > 118.98.221.205.saiscm: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.235058 IP 118.98.221.204.51659 > 118.98.221.205.ulistproc: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.235110 IP 118.98.221.204.51659 > 118.98.221.205.rprt: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.235150 IP 118.98.221.204.51659 > 118.98.221.205.ircd: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.235190 IP 118.98.221.204.51659 > 118.98.221.205.dei-icda: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.235220 IP 118.98.221.204.51659 > 118.98.221.205.avian: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.235253 IP 118.98.221.204.51659 > 118.98.221.205.mmcc: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.235285 IP 118.98.221.204.51659 > 118.98.221.205.shadowserver: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.236125 IP 118.98.221.204.51659 > 118.98.221.205.bootpc: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.236149 IP 118.98.221.204.51659 > 118.98.221.205.778: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.236171 IP 118.98.221.204.51659 > 118.98.221.205.oms: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.236194 IP 118.98.221.204.51659 > 118.98.221.205.commplex-link: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.236216 IP 118.98.221.204.51659 > 118.98.221.205.tr-rsrb-port: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.236269 IP 118.98.221.204.51659 > 118.98.221.205.ms-sql-s: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.236327 IP 118.98.221.204.51659 > 118.98.221.205.netnews: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.236351 IP 118.98.221.204.51659 > 118.98.221.205.prm-sm: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.236387 IP 118.98.221.204.51659 > 118.98.221.205.3com-amp3: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.236409 IP 118.98.221.204.51659 > 118.98.221.205.meter: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.236446 IP 118.98.221.204.51659 > 118.98.221.205.blackjack: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.236483 IP 118.98.221.204.51659 > 118.98.221.205.softpc: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.236537 IP 118.98.221.204.51659 > 118.98.221.205.756: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.236578 IP 118.98.221.204.51659 > 118.98.221.205.hems: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.236616 IP 118.98.221.204.51659 > 118.98.221.205.ipp: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.236646 IP 118.98.221.204.51659 > 118.98.221.205.netrjs-3: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.236674 IP 118.98.221.204.51659 > 118.98.221.205.netview-aix-5: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.236717 IP 118.98.221.204.51659 > 118.98.221.205.sd: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.236761 IP 118.98.221.204.51659 > 118.98.221.205.27002: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.236796 IP 118.98.221.204.51659 > 118.98.221.205.768: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.236833 IP 118.98.221.204.51659 > 118.98.221.205.cichlid: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.236857 IP 118.98.221.204.51659 > 118.98.221.205.vnas: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.236904 IP 118.98.221.204.51659 > 118.98.221.205.rap-service: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.236936 IP 118.98.221.204.51659 > 118.98.221.205.pehelp: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.236983 IP 118.98.221.204.51659 > 118.98.221.205.3l-l1: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.237020 IP 118.98.221.204.51659 > 118.98.221.205.gridgen-elmd: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.237055 IP 118.98.221.204.51659 > 118.98.221.205.6009: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.237079 IP 118.98.221.204.51659 > 118.98.221.205.858: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.237117 IP 118.98.221.204.51659 > 118.98.221.205.distcc: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.237158 IP 118.98.221.204.51659 > 118.98.221.205.teedtap: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.237200 IP 118.98.221.204.51659 > 118.98.221.205.prosharenotify: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.237237 IP 118.98.221.204.51659 > 118.98.221.205.netview-aix-8: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.237268 IP 118.98.221.204.51659 > 118.98.221.205.robcad-lm: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.237297 IP 118.98.221.204.51659 > 118.98.221.205.codaauth2: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.237333 IP 118.98.221.204.51659 > 118.98.221.205.cisco-fna: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.237383 IP 118.98.221.204.51659 > 118.98.221.205.hybrid-pop: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.237425 IP 118.98.221.204.51659 > 118.98.221.205.netbios-ns: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.237465 IP 118.98.221.204.51659 > 118.98.221.205.zion-lm: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.237500 IP 118.98.221.204.51659 > 118.98.221.205.5801: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.237524 IP 118.98.221.204.51659 > 118.98.221.205.233: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.237559 IP 118.98.221.204.51659 > 118.98.221.205.964: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.237603 IP 118.98.221.204.51659 > 118.98.221.205.lmtp: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.237649 IP 118.98.221.204.51659 > 118.98.221.205.apc-6547: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.237689 IP 118.98.221.204.51659 > 118.98.221.205.3m-image-lm: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.237724 IP 118.98.221.204.51659 > 118.98.221.205.807: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.237756 IP 118.98.221.204.51659 > 118.98.221.205.ii-admin: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.237802 IP 118.98.221.204.51659 > 118.98.221.205.816: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.237823 IP 118.98.221.204.51659 > 118.98.221.205.766: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.237887 IP 118.98.221.204.51659 > 118.98.221.205.895: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.237927 IP 118.98.221.204.51659 > 118.98.221.205.250: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.238745 IP 118.98.221.204.51659 > 118.98.221.205.sqlserv: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.238767 IP 118.98.221.204.51659 > 118.98.221.205.afs3-volser: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.238790 IP 118.98.221.204.51659 > 118.98.221.205.6002: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.238813 IP 118.98.221.204.51659 > 118.98.221.205.smar-se-port1: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.238835 IP 118.98.221.204.51659 > 118.98.221.205.dsatp: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.238893 IP 118.98.221.204.51659 > 118.98.221.205.1472: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.238937 IP 118.98.221.204.51659 > 118.98.221.205.miroconnect: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.238969 IP 118.98.221.204.51659 > 118.98.221.205.anynetgateway: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.238994 IP 118.98.221.204.51659 > 118.98.221.205.escp-ip: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.239026 IP 118.98.221.204.51659 > 118.98.221.205.statsci2-lm: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.239066 IP 118.98.221.204.51659 > 118.98.221.205.fln-spx: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.239115 IP 118.98.221.204.51659 > 118.98.221.205.32779: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.239153 IP 118.98.221.204.51659 > 118.98.221.205.nas: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.239194 IP 118.98.221.204.51659 > 118.98.221.205.mapper-nodemgr: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.239225 IP 118.98.221.204.51659 > 118.98.221.205.bpdbm: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.239261 IP 118.98.221.204.51659 > 118.98.221.205.corbaloc: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.239289 IP 118.98.221.204.51659 > 118.98.221.205.kshell: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.239340 IP 118.98.221.204.51659 > 118.98.221.205.device2: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.239376 IP 118.98.221.204.51659 > 118.98.221.205.scx-proxy: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.239414 IP 118.98.221.204.51659 > 118.98.221.205.782: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.239443 IP 118.98.221.204.51659 > 118.98.221.205.827: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.239477 IP 118.98.221.204.51659 > 118.98.221.205.1015: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.239509 IP 118.98.221.204.51659 > 118.98.221.205.acas: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.239558 IP 118.98.221.204.51659 > 118.98.221.205.938: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.239594 IP 118.98.221.204.51659 > 118.98.221.205.ptp-general: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.239631 IP 118.98.221.204.51659 > 118.98.221.205.powerburst: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.239654 IP 118.98.221.204.51659 > 118.98.221.205.ss7ns: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.239698 IP 118.98.221.204.51659 > 118.98.221.205.ircs: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.239727 IP 118.98.221.204.51659 > 118.98.221.205.dberegister: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.239779 IP 118.98.221.204.51659 > 118.98.221.205.garcon: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.239816 IP 118.98.221.204.51659 > 118.98.221.205.crs: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.239861 IP 118.98.221.204.51659 > 118.98.221.205.32778: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.239897 IP 118.98.221.204.51659 > 118.98.221.205.xns-courier: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.239931 IP 118.98.221.204.51659 > 118.98.221.205.hermes: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.239956 IP 118.98.221.204.51659 > 118.98.221.205.5902: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.239993 IP 118.98.221.204.51659 > 118.98.221.205.iclpv-dm: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.240040 IP 118.98.221.204.51659 > 118.98.221.205.iso-tp0: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.240086 IP 118.98.221.204.51659 > 118.98.221.205.vat-control: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.240124 IP 118.98.221.204.51659 > 118.98.221.205.igi-lm: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.240163 IP 118.98.221.204.51659 > 118.98.221.205.arcisdms: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.240188 IP 118.98.221.204.51659 > 118.98.221.205.nuts_bootp: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.240219 IP 118.98.221.204.51659 > 118.98.221.205.4144: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.240258 IP 118.98.221.204.51659 > 118.98.221.205.timbuktu-srv1: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.240305 IP 118.98.221.204.51659 > 118.98.221.205.imsp: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.240345 IP 118.98.221.204.51659 > 118.98.221.205.joltid: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.240385 IP 118.98.221.204.51659 > 118.98.221.205.943: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.240420 IP 118.98.221.204.51659 > 118.98.221.205.geniuslm: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.240449 IP 118.98.221.204.51659 > 118.98.221.205.primaserver: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.240480 IP 118.98.221.204.51659 > 118.98.221.205.19150: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.240517 IP 118.98.221.204.51659 > 118.98.221.205.939: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.241361 IP 118.98.221.204.51659 > 118.98.221.205.332: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.241383 IP 118.98.221.204.51659 > 118.98.221.205.718: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.241406 IP 118.98.221.204.51659 > 118.98.221.205.dn6-smm-red: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.241428 IP 118.98.221.204.51659 > 118.98.221.205.fodms: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.241451 IP 118.98.221.204.51659 > 118.98.221.205.mloadd: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.241504 IP 118.98.221.204.51659 > 118.98.221.205.bl-idm: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.241567 IP 118.98.221.204.51659 > 118.98.221.205.797: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.241590 IP 118.98.221.204.51659 > 118.98.221.205.881: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.241625 IP 118.98.221.204.51659 > 118.98.221.205.clvm-cfg: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.241649 IP 118.98.221.204.51659 > 118.98.221.205.ftsrv: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.241682 IP 118.98.221.204.51659 > 118.98.221.205.ibm-cics: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.241721 IP 118.98.221.204.51659 > 118.98.221.205.sgmp-traps: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.241768 IP 118.98.221.204.51659 > 118.98.221.205.786: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.241807 IP 118.98.221.204.51659 > 118.98.221.205.rmt: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.241844 IP 118.98.221.204.51659 > 118.98.221.205.230: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.241869 IP 118.98.221.204.51659 > 118.98.221.205.postgres: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.241903 IP 118.98.221.204.51659 > 118.98.221.205.983: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.241940 IP 118.98.221.204.51659 > 118.98.221.205.imap: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.241994 IP 118.98.221.204.51659 > 118.98.221.205.933: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.242035 IP 118.98.221.204.51659 > 118.98.221.205.802: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.242081 IP 118.98.221.204.51659 > 118.98.221.205.imap: R 3235918386:3235918386(0) win 0
09:07:35.242086 IP 118.98.221.204.51659 > 118.98.221.205.ndm-requester: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.242122 IP 118.98.221.204.51659 > 118.98.221.205.50000: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.242162 IP 118.98.221.204.51659 > 118.98.221.205.dbase: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.242193 IP 118.98.221.204.51659 > 118.98.221.205.870: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.242226 IP 118.98.221.204.51659 > 118.98.221.205.pegboard: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.242255 IP 118.98.221.204.51659 > 118.98.221.205.pdap: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.242302 IP 118.98.221.204.51659 > 118.98.221.205.ipsec-nat-t: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.242343 IP 118.98.221.204.51659 > 118.98.221.205.dn6-nlm-aud: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.242383 IP 118.98.221.204.51659 > 118.98.221.205.723: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.242421 IP 118.98.221.204.51659 > 118.98.221.205.4333: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.242445 IP 118.98.221.204.51659 > 118.98.221.205.225: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.242476 IP 118.98.221.204.51659 > 118.98.221.205.wnn4_Kr: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.242515 IP 118.98.221.204.51659 > 118.98.221.205.netcheque: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.242566 IP 118.98.221.204.51659 > 118.98.221.205.rndc: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.242606 IP 118.98.221.204.51659 > 118.98.221.205.1006: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.242645 IP 118.98.221.204.51659 > 118.98.221.205.976: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.242681 IP 118.98.221.204.51659 > 118.98.221.205.bhmds: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.242709 IP 118.98.221.204.51659 > 118.98.221.205.filenet-nch: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.242739 IP 118.98.221.204.51659 > 118.98.221.205.vid: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.242777 IP 118.98.221.204.51659 > 118.98.221.205.vacdsm-sws: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.242826 IP 118.98.221.204.51659 > 118.98.221.205.la-maint: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.242860 IP 118.98.221.204.51659 > 118.98.221.205.decvms-sysmgt: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.242896 IP 118.98.221.204.51659 > 118.98.221.205.pip: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.242920 IP 118.98.221.204.51659 > 118.98.221.205.lotusnote: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.242964 IP 118.98.221.204.51659 > 118.98.221.205.auditd: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.243000 IP 118.98.221.204.51659 > 118.98.221.205.cvsup: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.243045 IP 118.98.221.204.51659 > 118.98.221.205.793: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.243082 IP 118.98.221.204.51659 > 118.98.221.205.vpac: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.243118 IP 118.98.221.204.51659 > 118.98.221.205.ph: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.243141 IP 118.98.221.204.51659 > 118.98.221.205.ris: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.243984 IP 118.98.221.204.51659 > 118.98.221.205.mit-ml-dev: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.244005 IP 118.98.221.204.51659 > 118.98.221.205.sfs-config: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.244028 IP 118.98.221.204.51659 > 118.98.221.205.aspeclmd: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.244050 IP 118.98.221.204.51659 > 118.98.221.205.onmux: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.244073 IP 118.98.221.204.51659 > 118.98.221.205.krb5_prop: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.244127 IP 118.98.221.204.51659 > 118.98.221.205.knetd: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.244159 IP 118.98.221.204.51659 > 118.98.221.205.13710: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.244204 IP 118.98.221.204.51659 > 118.98.221.205.9152: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.244234 IP 118.98.221.204.51659 > 118.98.221.205.85: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.244275 IP 118.98.221.204.51659 > 118.98.221.205.shell: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.244298 IP 118.98.221.204.51659 > 118.98.221.205.prospero: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.244343 IP 118.98.221.204.51659 > 118.98.221.205.opc-job-start: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.244372 IP 118.98.221.204.51659 > 118.98.221.205.prm-nm: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.244424 IP 118.98.221.204.51659 > 118.98.221.205.opalis-robot: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.244459 IP 118.98.221.204.51659 > 118.98.221.205.emfis-cntl: S 3235918385:3235918385(0) win 3072 <mss 1460>
09:07:35.244499 IP 118.98.221.204.51659 > 118.98.221.205.dsp: S 3235918385:3235918385(0) win 4096 <mss 1460>
09:07:35.244527 IP 118.98.221.204.51659 > 118.98.221.205.finger: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.244563 IP 118.98.221.204.51659 > 118.98.221.205.819: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.244592 IP 118.98.221.204.51659 > 118.98.221.205.ohimsrv: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.244644 IP 118.98.221.204.51659 > 118.98.221.205.1008: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.244680 IP 118.98.221.204.51659 > 118.98.221.205.at-5: S 3235918385:3235918385(0) win 1024 <mss 1460>
09:07:35.244720 IP 118.98.221.204.51659 > 118.98.221.205.compaq-evm: S 3235918385:3235918385(0) win 2048 <mss 1460>
09:07:35.244742 IP 118.98.221.204.51659 > 118.98.221.205.1005: S 3235918385:3235918385(0) win 1024 <mss 1460>

Analisa hasil
- Dari hasil port scaning oleh server 118.98.221.204 menggunakan nmap tampak bahwa server 118.98.221.204 melakukan scanning terhadap sejumlah port yang ada di server 118.98.221.205 dan diperoleh hasil 1665 port tertutup dan beberapa port aktif misalnya port 1, 21, 22, 25, 53 dan 80 yang memiliki layanan-layanan seperti TCPmux, FTP, SSH, SMTP, domain, dan HTTP
- Dari hasil pemantauan menggunakan tcpdump pada server 118.98.221.205 tampak bahwa terdapat rekuest dari server 118.98.221.204 yang mencoba mencari status sejumlah port pada server 118.98.221.205

Leave a Comment

Optimalkan kode program PHP

Sumber : http://metadesain.com/script-website-php/optimalkan-kode-program-php

Dengan kita mengoptimalkan pemrograman bahasa PHP akan membantu mengurangi beban server dalam memproses script pemrograman pada saat menerima request yang berlebihan. Optimalisasi kode program/ script bahasa PHP merupakan optimalisasi yang sangat dasar dalam perancangan aplikasi website. Setelah mengoptimalisasi script PHP- nya, maka dapat kita lanjutkan ke optimalisasi database, dan web server.

Berikut adalah beberapa panduan untuk mengoptimalkan kode PHP anda:

  • Sebisa mungkin deklarasikan method dalam class sebagai statik.
  • Gunakan echo daripada print untuk mengirimkan output ke browser.
  • echo “a”;  echo “b”;  echo “‘c”’; lebih baik daripada $string=”a”.”b”.”c”; echo $string;
  • echo $a,$b,$c lebih cepat daripada echo $a.$b.$c
  • Gunakan foreach daripada while untuk penelusuran.
  • Unset variable yang telah selesai digunakan terutama variable yang membutuhkan memori besar seperti array.
  • Hindari penggunaan _get, _set, _autoload.
  • Penggunaan require_once membutuhkan resource cukup besar, jadi pergunakan seperlunya.
  • Gunakan fullpath untuk include atau require karena bila menggunakan variable untuk path misalnya OS Path maka diperlukan waktu tambahan untuk parsing variable.
  • Hindari penggunaan regex bila masih bisa menggunakan function string seperti srncasecmp, strpbrk, stripos, dan lain-lain.
  • Untuk perbandingan variable, === akan lebih baik dibandingkan hanya ==.
  • Tutup koneksi database bila sudah selesai digunakan.
  • Hindari ouput error sebisa mungkin dalam aplikasi rilis sebaiknya hanya digunakan dalam debugging aplikasi;
  • Jangan menggunakan fungsi dalam statement loop misalnya for ($x=0; $x < count($array); $x) karena akan memanggil fungsi untuk setiap loop.
  • Gunakan kutip untuk mengakses array. Contoh: row["id"] is 7 lebih cepat dari $row[id].
  • Hindari penggunaan variable global.
  • Gunakan single kutip dibanding menggunakan double kutip karena penggunaan double kutip akan mengecek variable di dalam string. Misalnya echo ‘Isi A=’.$a; lebih cepat dibandingkan echo “Isi A=$a”;
  • Sebisa mungkin gunakan html dari pada php untuk ouput. Misalnya
<?php if($a):?>
 <p>A benar</p>
<?php else:?>
 <p>A salah</p>
<?php endif; ?> 

Lebih baik dibandingkan

<?php
if($a)
echo '<p> A benar </p>';
else
echo '<p> B salah </p>;
?>
  • Gunakan pengecekan variable sebelum mengecek tipe variable. Karena pengecekan tipe variable yang tidak ada, akan memakan resource lebih banyak.
  • ++$i lebih baik daripada $i++
  • Gunakan lowercase karena true lebih baik dari TRUE, false lebih baik dari FALSE dan null lebih baik dari NULL.
  • $var===null lebih baik daripada is_null($var).
  • Untuk memanggil fungsi dalam class maka sebaiknya gunakan reference operator & (and)
$a= new ClassA; $b=& $a->fungsiA();

akan lebih baik dibandingkan

$a= new ClassA; $b=$a->fungsiA();

Apa yang disebutkan di atas bukan nilai mutlak dari performance aplikasi anda, karena perkembangan versi PHP ke depan selalu memungkinkan optimasi kode program lebih baik. Sebaiknya selalu gunakan PHP versi terakhir karena akan selalu ada peningkatan performance. Contohnya PHP5 lebih lebih cepat dibandingkan PHP4.

Referensi:

  • http://reinholdweber.com/?p=3
  • http://www.phpbench.com/
  • http://phplens.com/lens/php-book/optimizing-debugging-php.php
  • http://www.pradosoft.com/wiki/index.php/Coding_Conventions_and_Guidelines
  • http://www.thinkrooms.com/2008/07/08/optimalisasi-kode-program-php/

Read more: Jasa Pembuatan Website, Training Kursus Website Surabaya, Jasa SEO – Optimalkan kode program PHP – Jasa Pembuatan Website, Training Kursus Website Surabaya, Jasa SEO

Leave a Comment

Load Balancing Web Server Menggunakan Apache mod_proxy

Sumber : http://www.johnandcailin.com/blog/john/scaling-drupal-step-two-sticky-load-balancing-apache-modproxy

 

scaling drupal step two – sticky load balancing with apache mod_proxy

if you’ve setup your drupal deployment with a separate database and web (drupal) server (see scaling drupal step one – a dedicated data server), a good next step, is to cluster your web servers. drupal generates a considerable load on the web server and can quickly become resource constrained there. having multiple web servers also increases the the redundancy of your deployment. as usual, my examples are for apache2, mysql5 and drupal5 on debian etch. see the scalability overview for related articles.

one way to do this is to use a dedicated web server running apache2 and mod_proxy / mod_proxy_balancer to load balance your drupal servers.

deployment overview

this table summaries the characteristics of this deployment choice

scalability: fair
redundancy: fair
ease of setup: fair

servers

in this example, i use:

web server drupal-lb1.mydomain.com 192.168.1.24
web server drupal-lb2.mydomain.com 192.168.1.25
data server drupal-data-server1.mydomain.com 192.168.1.26
load balancer apache-balance-1.mydomain.com 192.168.1.34

network diagram

load balancer setup: install and enable apache and proxy_balancer

create a dedicated server for load balancing. install apache2 (apt-get install apache2) and then install mod proxy_balancer and proxy_http with dependencies

# a2enmod proxy_balancer
# a2enmod proxy_http

enable mod_proxy in mods-available/proxy.conf. note that i’m leaving ProxyRequests off since we’re only using the ProxyPass and ProxyPassReverse directives. this keeps the server secure from spammers trying to use your proxy to send email.

<IfModule mod_proxy.c>
# set ProxyRequests off since we're only using the ProxyPass and ProxyPassReverse
# directives. this keeps the server secure from
# spammers trying to use your proxy to send email.

ProxyRequests Off

<Proxy *>
AddDefaultCharset off
Order deny,allow
Allow from all
#Allow from .example.com
</Proxy>

# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block

ProxyVia On
</IfModule>

configure mod_proxy and mod_proxy_balancer

mod_proxy and mod_proxy balancer serve as a very functional load balancer. however mod_proxy_balancer makes slightly unfortunate assumptions about the format of the cookie that you’ll use for sticky session handling. one way to work around this is to create your own session cookie (very easy with apache). the examples below describe how to do this

first create a virtual host or use the default (/etc/apache2/sites-available/default) and add this configuration to it:

<Location /balancer-manager>
SetHandler balancer-manager

Order Deny,Allow
Deny from all
Allow from 192.168
</Location>

<Proxy balancer://mycluster>
# cluster member 1
BalancerMember http://drupal-lb1.mydomain.com:80 route=lb1

# cluster member 2
BalancerMember http://drupal-lb2.mydomain.com:80 route=lb2
</Proxy>

ProxyPass /balancer-manager !
ProxyPass / balancer://mycluster/ lbmethod=byrequests stickysession=BALANCEID
ProxyPassReverse / http://drupal-lb1.mydomain.com/
ProxyPassReverse / http://drupal-lb2.mydomain.com/

note:

  • i’m allowing access to the balancer manager (the web UI) from any IP matching 192.168.*.*
  • i’m load balancing between 2 servers (drupal-lb1.mydomain.com, drupal-lb2.mydomain.com) on port 80
  • i’m defining two routes for these servers called lb1 and lb2
  • i’m excluding (!) the balancer-manager directory fro the ProxyPass to allow access to the manager ui on the load balancing server
  • i’m expecting a cookie called BALANCEID to be available to manage sticky sessions
  • this is a simplistic load balancing configuration. apache has many options to control timeouts, server loading, failover etc. too much to cover but read more in the apache documentation

configure the web (drupal) servers to write a session cookie

on each of the web (drupal) servers, add this code to your vhost configuration:

RewriteEngine On
RewriteRule .* - [CO=BALANCEID:balancer.lb1:.mydomain.com]

making sure to specify the correct route e.g. lb1 on drupal-lb1.mydomain.com etc.

you also probably want to setup your cookie domain properly in drupal, i.e. modify drupal/sites/default/settings.php as follows:

# $cookie_domain = 'example.com';
$cookie_domain = 'mydomain.com';

important urls

useful urls for testing are:

  • balancer manager ui: http://apache-balance-1.mydomain.com/balancer-manager
  • direct access to drupal on lb1: http://drupal-lb1.mydomain.com/drupal/
  • direct access to drupal on lb1: http://drupal-lb2.mydomain.com/drupal/
  • access to drupal through the load balancer: http://apache-balance-1.mydomain.com/drupal/

the balancer manager

the mod_proxy_balancer ui enables point-and-click update of balancer members.

the balancer manager allows you to dynamically change the balance factor or a particular member, change it’s route or put it in the off line mode.

debugging

to debug your configuration it’s useful to turn up apache’s debugging level on your apache load balancer by adding this to your vhost configuration:

LogLevel debug

this will produce some very useful debugging output (/var/log/apache2/error.log) from the proxying and balancing code.

firefox’s cookie viewer tools->options->privicy->show cookies is also useful to view and manipulate your cookies.

if you plan to experiment with bringing servers up and down to test them being added and removed from the cluster you should consider setting the “connection pool worker retry timeout” to a value lower than the default 60s. you could set them to e.g. 10s by changing your configuration to the one below. a 10s timeout allows for quicker test cycles.

BalancerMember http://drupal-lb1.scream.squaretrade.com:80 route=lb1 retry=10
BalancerMember http://drupal-lb2.scream.squaretrade.com:80 route=lb2 retry=10

next steps

one single-point-of-failure in this deployment is the apache load balancer. consider clustering your load balancer with scaling drupal step three – using heartbeat to implement a redundant load balancer

references and documentation

tech blog

if you found this article useful, and you are interested in other articles on linux, drupal, scaling, performance and LAMP applications, consider subscribing to my technical blog.

bookmark/search this post with:

Leave a Comment

Follow

Get every new post delivered to your Inbox.