Thursday, 26 February 2015

What is UPnP in Skype?



What is UPnP in skype?
UPnP means Universal Plug and Play. UPnP is program that automatically connect to the router and set the ports automatically without you having to do it setup up port manually.
For more information: http://en.wikipedia.org/wiki/Universal_Plug_and_Play


What does enable UPnP do in skype?
If we check the checkbox in front of UPnP, It means we have enabled the UPnP.
When we enable the UPnP, It will connect to the router and set the port automatically.


What does disable UPnP do in skype?
If we un-check the checkbox in front of UPnP, It means we have disabled the UPnP.
When we disabled the UPnP, It will not connect to the router and never the port automatically.


Wednesday, 25 February 2015

How to store array in Cookie and retrieve array from cookie

How to store array in Cookie and retrieve array from cookie

How to store array in Cookie
We need to json_encode the array then save the data with setcookie function.
$arrayData=array(
    'web technology experts',
    'web technology experts Notes',
    'web technology experts Notes  php technology'    
);
setcookie('cookieData', json_encode($arrayData));


How to Retrieve array in Cookie
As we have encoded the array above, So we need to json_decode the array before use.
$arrayData = json_decode($_COOKIE['cookieData']);


How to set time in cookies
$arrayData=array(
    'web technology experts',
    'web technology experts Notes',
    'web technology experts Notes  php technology'    
);
setcookie('cookieData', json_encode($arrayData), time()+3600);// set time for 1 hour [1 hour=3600 seconds]