Sunday, February 20, 2011

3 method to open url from php

Method 1:  Curl
//Check for curl before doing anything
if(function_exists(“curl_init”)){
//Initialize curl
$curl_feed = curl_init(“http://netw0rk.blogspot.com/”);
//Curl Options
curl_setopt($curl_feed, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_feed, CURLOPT_HEADER, 0);
//Store our data
$data = curl_exec($curl_feed);
//Close curl
curl_close($curl_feed);
}
Method 2:  fopen
//Initialize fopen
$fopen_feed = @fopen(“http://netw0rk.blogspot.com/”, “r”);
//Make sure fopen was successfull
if ($fopen_feed) {
//Store our data
$data = “”;
while (!feof($fopen_feed)) {
$data .= fread($fopen_feed, 8192);
}
}
//Close fopen
fclose($fopen_feed);
Method 3:  fsockopen
//Initialize fsockopen
$fsockopen_feed = @fsockopen(“http://netw0rk.blogspot.com/”, 80, $errno, $errstr, 30);
if ($fsockopen_feed){
//Create our headers for the request
$headers = “GET http://netw0rk.blogspot.com/  HTTP/1.1\r\n”;
$headers .= “Host:  netw0rk.blogspot.com”\r\n”;
$headers .= “Connection: Close\r\n\r\n”;
fwrite($fsockopen_feed, $headers);
//Store our data
$data = “”;
while (!feof($fsockopen_feed)){
$data .= fgets($fp, 128);
}
//Close fsockopen
fclose($fsockopen_feed);
// Strip the header information
$data = explode(“\\r\\”, $data);
$data = $data[1];
}

Thursday, February 10, 2011

network security

Now I want to talk about security. After years passed by, I think the noted innovation is:

  1. cisco IOS rootkit. I'ts never heard on wild, but it's really a breaktrough.
  2. Nero NRG infection. I already guess it's will happen.
  3. w32 STUXNET. Haha, welcome to new world weapon.
  4. Software based Radio. Now it's easy to server as BTS from your pc, and eavesdrop all sms traffic that pass your bts.

Nganggur

Nganggur iku gak enak, believe me. Cuman jika kita terlalu terikat dengan pekerjaan, maka kita akan terpenjara dengan pekerjaan itu. Kita harus bisa mengatur bagaimana hidup kita itu seimbang. Imbang antara dolan lan kerjo. Imbang antara hak dan kewajiban, intinya disitu!