lemonade
where dream meets reality
Categories: apaan sih? | Add a Comment

FreeBSD security officer Colin Percival confirmed the issue could allow a local user to execute arbitrary code as root.  It affects FreeBSD versions 7.1 and 8.0. nah buat elo2 yg punya server freebsd 7.x sampe 8.0, mendingan cepet2 di patch deh. karena ada exploit dari zeroday yang direlease akhir november 2009 kemaren. Simple explanation of […]

Categories: php | Add a Comment

Pengen download video dari youtube? ngapain susah. nih gue kasih demo nya buat elo2 pada pake php. DEMO dan download script dapat dilihat di sini. <?php /* * youtube url downloader v0.2 – after youtube upgrade 29 agustus 2009 * * by lemonade <firman@maxindo.net> * donation is very appreciated, paypal: cool01@indosat.net.id * * * ChangeLog * * v0.2 * 27/10/2009 – new parsing for youtube. * * v0.1 * 25/09/2009 – small fix for FLV url. * */ if(!empty($_REQUEST[‘yid’])) { $yid = trim($_REQUEST[‘yid’]); $yid = urldecode(rawurldecode($yid)); if (preg_match(‘%http://www.youtube.com/watch?v=(.*)%s’, $yid, $regs)) { […]

Categories: JSP | Add a Comment

HTTP Request – web browser atau http client merequest/mensubmit file/data ke server. HTTP Response – data yang dikirimkan kembali dari webserver terhadap web browser atau http client menjawab http request nya. Contoh, simple html form yang menggunakan jsp untuk validasi jawaban dari 5 + 5 File: form01.jsp <%@page contentType=”text/html” pageEncoding=”UTF-8″%> <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML […]

Categories: php | 1 Comment

Contoh client-server chatting (single client) menggunakan PHP socket. Server.php <?php //The Server error_reporting(E_ALL); $address = “127.0.0.1”; $port = “10000”; /* create a socket in the AF_INET family, using SOCK_STREAM for TCP connection */ $mysock = socket_create(AF_INET, SOCK_STREAM, 0); // if socket is uses, we reuse it if (!socket_set_option($mysock, SOL_SOCKET, SO_REUSEADDR, 1)) { echo socket_strerror(socket_last_error($mysock)); exit; […]

Categories: apaan sih? | 1 Comment

TCP Fungsi – Socket adalah 1 endpoint dari communication link antara 2 program di dalam sebuah network. Sebuah socket pasti memiliki sebuah port supaya TCP layer dapat meng-identifikasi aplikasi mana yg akan mengirim atau menerima data. UDP Fungsi – Datagram communication atau yang di kenal dengan UDP, adalah connectionless protocol, yang artiinya tidak dibutuhkan handshaking […]

Categories: apaan sih? | Add a Comment

•   HTTP – Hypertext Transfer Protocol Fungsi – HTTP adalah appliation-level protocol yang kebanyakan digunakan untuk aplikasi world wide web. Cara Kerja – Port standard HTTP adalah port 80 (pada server). – http adalah application level protocol client-server yang menggunakan request/response method. – Web server menunggu connection dari web browser (http client) untuk meminta request […]

Categories: C | Add a Comment

simple.c – download link // named pipe // Firman Gautama #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/wait.h> #include <sys/types.h> #include <sys/stat.h> #include <string.h> int main(void) { int p, check, nilai; FILE *fp; // sebelum fork system(“clear”); check = mkfifo(“pipe”, 0666); if(check < 0) {   printf(“pipe gagaln”); exit(0); } // forking stuff p = fork(); […]

Categories: C | Add a Comment

simple.c – download link // unnamed pipe // Firman Gautama #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/wait.h> #include <sys/types.h> #include <string.h> int main(void) { int p, blah[2], check; int nilai; // sebelum fork check = pipe(blah); if(check < 0) {   printf(“pipe gagaln”); exit(0); } system(“clear”); // forking stuff p = fork(); if(p < 0) […]

Categories: Javascript | 1 Comment

Session adalah temporary variable yang dibuat oleh server side scripting, oleh sebab itu javascript (client side scripting)tidak bisa membaca session/menulis secara directly tanpa bantuan server side scripting. Contoh session javascript + php: (http://download.indolayer.com/tmp/test1.php) <?php // test1.php session_start(); $_SESSION[‘dodol’] = “apa aja deh”; ?> <html> <head> <title> test session </title> </head> <body> <script type=”text/javascript”> var apple_s […]