Stieg Larsson: Millenium # 1
The Girl with the Dragon Tattoo by Stieg Larsson
Great piece of work.. Lisbeth and Blomkvist won't let you keep the book down.
View all my reviews
The Girl with the Dragon Tattoo by Stieg Larsson
Great piece of work.. Lisbeth and Blomkvist won't let you keep the book down.
View all my reviews
Posted by Pranay Dharmale at 11:20 AM 0 comments
Recently I came across this trivial problem of checking whether a server is ONLINE or OFFLINE. I tried "Ping" command but the following approach was more elegant.
$host = "127.0.0.1"; // could be any host address
$port = "80"; // port you wanna check
$fp = @fsockopen($host, $port, $errno, $errstr, 2);
if (!$fp) {
echo "DEAD";
}
else {
echo "ALIVE";
}
Posted by Pranay Dharmale at 1:28 AM 0 comments
Posted by Pranay Dharmale at 9:02 AM 6 comments
Labels: c, c++, cdt plugin, eclipse, windows 7