picture picture
October 25, 2011 PHP 0 Comments

Seconds to String

This function will return the duration of the given time period in days, hours, minutes and seconds.

e.g. secondsToStr(1234567) would return “14 days, 6 hours, 56 minutes, 7 seconds”

1
2
3
4
5
6
7
8
9
10
<?php
function secondsToStr($secs) {
if($secs>=86400){$days=floor($secs/86400);$secs=$secs%86400;$r=$days.' day';if($days<>1){$r.='s';}if($secs>0){$r.=', ';}}
if($secs>=3600){$hours=floor($secs/3600);$secs=$secs%3600;$r.=$hours.' hour';if($hours<>1){$r.='s';}if($secs>0){$r.=', ';}}
if($secs>=60){$minutes=floor($secs/60);$secs=$secs%60;$r.=$minutes.' minute';if($minutes<>1){$r.='s';}if($secs>0){$r.=', ';}}
$r.=$secs.' second';if($secs<>1){$r.='s';}
return $r;
}

?>
October 25, 2011 PHP 1 Comments

Get Remote IP Address in PHP

PHP Script to find out the IP address.

1
2
3
4
5
6
<?php
function getRemoteIPAddress() {
$ip = $_SERVER['REMOTE_ADDR'];
return $ip;
}
?>

The above code will not work in case your client is behind proxy server. In that case use below function to get real IP address of client.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
function getRealIPAddr()
{
if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet
{
$ip=$_SERVER['HTTP_CLIENT_IP'];
}
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy
{
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}
else
{
$ip=$_SERVER['REMOTE_ADDR'];
}
return $ip;
}
?>
October 23, 2011 Personal, Technology 2 Comments

My Facebook new timeline profile

Recently Facebook announced a host of new features in what was described by industry observers as the biggest shakeup in Facebook’s history. Most of these changes are obviously due to the emerging and growing threat from Google Plus, and one of the features that Mark Zuckerberg introduced was the radical redesign of the profile page. It’s called the “timeline” and it could prove to be the most controversial change of them all.

As the name “timeline” implies, you can move the slider back over every year you have had the Facebook profile and see all your old status messages. I found it fascinating seeing what I posted years ago and laughing at some of the bad jokes that I posted (and some of the good ones too).

My new Facebook timeline profile

Sandykadam facebook timeline profile

Sandykadam facebook timeline profile

On the whole, the timeline profile is an interesting development but it is a radical departure from what the profile used to be like, so I am sure there will be lots of people who will vehemently hate the design. But I would say give it a chance.

Not everyone has the timeline design yet and you may have to wait up to several weeks for it. However, if you’re curious about how it looks on your profile and you want to try it out now, then here is how to do it.

Please note however that your new timeline page will only be viewable to those who also have the timeline design page. Those who still have the old page design will continue to see your old page design until the timeline feature goes mainstream for everyone.

New update as on 7th Dec 2011 Facebook Timeline profile is now public.

September 27, 2011 Personal 0 Comments

Hello world!

Welcome to My World!!!

This is my first post in my personal blog site 🙂 I will be adding some useful & personal liked stuff.

So enjoy reading and feel free to give your feedback.

Thank you!

Stay in touch.

 

 

Trek to Karnala

Monsoon season, month of June a awesome rainy climate and all greenery everywhere it was time to go out and feel the nature. All over there was only one topic of discussion “Pinic”, “Trip”, “outing”.  I was also eager to go out and have fun in the rain, so finally I decided. Had discussion with all colleagues and planning was started. After endless discussions to pick a good destination. At last the trek was finalized !!! huh!  and that was Karnala, a bird sanctuary. Why ? ’cause it was an easy one ! Because we had some females who were doing trek first time so we had think about them as well…:) 🙂 that was also one of the points that contributed towards its vote, another one  it was one day short and good trip.

Some info about the Karnala fort:
Height: 1500 feet above MSL (Approx)
Grade: Easy
Type: Hill Fort

Travel by Train – Panvel Local from Thane or Vashi
Travel by Bus – Any city bus going towards Alibaug

Karnala fort is a hill fort in Raigad district about 13 km from Panvel. Currently it is a protected place lying within the Karnala Bird Sanctuary. It was a fort of strategic importance. More information check here.

I have put my trek experience in words as follows, hope you will enjoy it.

This is one of the memorable photo of trip and I loved it.

(From top Swapnil, Vaibhav, Priyank, Anurag, Nikita; Standing pose from left Vidula, Ketaki, Pooran Singh Kunwar, Gaurao, Lakshmana, Vivek, Geeta, Shashi, Mrs. Shashi, Kshama; Sitting down pose from left Senthil, Shagun, Me, Mahaprasad, Pratik)

Date was finalized as 2nd June, 2011 Saturday, so all done bus was finalized and contri was decided per head and money collection work was given to Nikita, As usual I had send mail to our team about the trip destination, contribution, bus timing and route details etc.

Day arrived, bus start pickup point was Borivali where Shashi, Ketaki & Pratik was first to get the bus at 6.30am.  I also wake up early b’coz my pickup point was Teen Haat Naka, Thane @ 7.45am. Me, Vidula, Senthil, Nikita we all met at Teen Haat Naka. Bus arrived and we all were greeted by Ketaki, Swapnil & Pratik, was feeling very happy and exited. Then journey started picking all the guys from given pickup points and we reached Vashi where we had some snacks as Shagun was yet to come. So till he comes we had good snacks and tea and ready to go.

Now all members were there in bus and we started our journey with singing picnic song to tease everyone with their personality matching movie songs.

Song was something like this “8 wajle kombda aaravla…saku geli panyala… sakula watet kon bhetla …. ‘Sandy’

Sandy la bhagun saku kai mhanali…. (then song for me starts 🙂 )… Kadhi tu…kadhi tu rimzim zarnari barsat….!!!.”

It was very funny and all enjoyed it… With this entertainment and jokes going on we reached our destination. All get down from bus and was exited to start the trek.. but before that we had group photo session. It was early morning and you will find all faces smiling and energetic…but in post trek photos you will see all battery down :p

Photo session over, we started walking towards entry point of Karnala Bird Sanctury.  At the gate we have to pay entry fee of Rs.20 per person is charged before entering. They even take Rs.100 deposit for carrying plastic bottles (they ask the count of water or any plastic bottles we are carrying) which is refunded when we return and show them the same count which was while going we have told to them. If bottle is lost then they don’t refund Rs.100. This is to avoid mess with nature. Sometimes people throw plastics or plastic bottles which may harm the nature/animals. Good initiative by local body.

We started our trek, at the start we have to walk on pakka/tar road for 15-20 minutes then we have to take a left turn where we start our actual trek from jungle all trees and bushes. There are name plates on all trees mentioning the details about the tree. It takes roughly around 2-3 hrs to climb karnala fort. This 2-3 hrs journey is very interesting as we get to hear different sounds of birds and totally silent place. Some of the patches are very difficult like some have big rocks on the way and some are very slippery, literally we have to sit down and move further.  In between some guys were singing, some were cracking jokes, koi ek dusre ki taang khitch raha tha, some were making comments on project issues :). It was full entertaining, Gaurao started singing “Jalebi Bai…jalebi bai…. naam jalebi bai” song with so enthusiasm as if Jalebi Bai is dancing with him :).

Trek in monsoon is incomplete/useless without Rains!!!, we had good luck and we got a chance to get wet in rain, it was almost 60% of the trek complete when rain was started; we were happy and started shouting. Rain put some more energy and we started walking further.

Finally after doing some photo sessions in between and some halts we reached ballekilla of fort and started climbing by the staircases which lead to our final destination!. After reaching all were exhausted and took a rest. All were hungry and thirsty, they all started taking out snacks & other eating stuffs from the bag and were eating them like anything :). We spend more time on taking rest, roaming on top, enjoying water in water resovior of fort. It was just amazing, view from fort was just awesome, mind blowing.

It was 4pm then we decided to get down but at the top, it was amazing feeling nobody was ready to leave that lovely place. I was feeling like stay there and just relax, no work, no PC, no mails, no manager, no worries… nothing just get some peace. But finally, we moved on and started our back to home journey from fort. Gaurao as usual was singing “Jalebi bai..” song in between which made all of us some laugh and feeling better. After getting down at some point we got two way/path to get down, one was which we came and another was unknown for us and some guys like Mahaprasad/Gaurao said it will be easy and fast to get down. So we started following them but like I said before there were some patches which were difficult. As there were shower of rains so the road became fully muddy & slippery. We were just walking and walking and path to walk was not easy, all were tired specially girls 🙂 it was Geeta’s first time for trek and she never had walked so much :p; she started crying and was not ready to walk, so we gave her hand to help and walk with us as the road was very slippery and wet.  After some point we got to hear some noise of vehicles moving, we thought we are now very near to our exit point!!! so were more exited and started walking without thinking of pain.

Gaurao & Mahaprasad and some other guys were very far from us and moving further and was shouting “bass abhi 5 minute mein daambar ka rasta aanewala hai…”

Which was making us more hopes of reaching destination very fast. After passing 20-30 mins still we were not able to see the exit point so we were like all getting irritated & frustrated and giving gaali to Mahaprasad & Gaurao b’coz they said we are near and will get tar/daambar road in 5 mins. It was so painful and frustrating; that we were thinking why we listen to BA (Gaurao) [BA’s requirement gathering is always incorrect !!!] and followed this route. But there was no option other then walking. Finally after a long walk we got at  MTDC resort of Karnala and so called our exit point. Hussssh!!!!

All tired & hungry, we took some rest and got fresh. We decided to go for dinner, Pooran suggested that we will have Chicken Lapeta which is very tasty & delicious. So we agreed & started moving towards bus. Took one group photo & headed towards that dhaba named “Sai Krupa” which is near to Panvel on highway (old Goa highway).  Then we reached that dhaba and ordered Chiken lapeta & Veg menu. No doubt Chiken lapeta was really very delicious; we all ate it like anything b’coz all were hungry and very tired.  After heavy dinner we had mast Ice-cream as we had some more extra money from contri. It was then around 8.30pm or 9pm we get into bus and so that was end to an beautiful day. All got some energy and started shouting and singing and we headed towards Pen to drop Nikita as she didn’t had any transport option to go back.  So after dropping her again we moved towards Vashi and we went on dropping everybody at their drop points.

So this was end of great trek & trip to Karnala, we had lot of fun and everybody enjoyed it. My sincere thanks to all for making this good and wonderful trip & promised to arrange some more good trips.

Some more pics to check: http://www.sandykadam.com/2011/12/karnala-trek-image-gallery/