How do I create a session on a server in PHP? -


i trying make wdtv live plugin in linux, plays video web url.

i have url parsed html source code. problem url playable in xbmc, can't play in media players. checked xbmc log, , looks xbmc creates session movie url. below log xbmc log file.

info: xcurl::dlllibcurlglobal::easy_aquire - created session http://121.125.77.146 debug: cplayercorefactory::getplayers(http://121.125.77.146/cgi-bin/sbview.cgi?systype=10000&subtype=4&id0=17678&id1=27635&id2=368507&id3=285792&nodeid=3071517&userno=0&userid=&level=1&part=0&ispay=0&mkey=2bd5454e93890a8ae2fe76948764a2d6&skey=5176153017445b5b79f897eec711996b&dummy=1279941981&title=%5bstar2gether%5d%20%c0%cc%ba%a5%c6%ae%c0%fc_1%ba%ce&impurl=&tvinfo=10000,4,17678,27635,368507,285792,) 

is possible xbmc in php? thanks

adding on sac's answer, you'll need implement authentication system if want single media player use it, kind of netflix does. afaik, netflix generates key stored in registry identifies computer , uses key access netflix's servers. assume xbmc has similar implementation generates key, stores somewhere , uses key session id.

from url you've given, there 2 parameters saw keys similar keys explained above: "mkey=2bd5454e93890a8ae2fe76948764a2d6&skey=5176153017445b5b79f897eec711996b" these keys passed through querystring (everything ? in url) possibly identify xbmc.

in order reproduce this, won't need php sessions eg:

session_start(); $_session['session_key'] = $_request['session_key']; // use either $_get or $_post in production if($_session['session_key'] == "the_super_secret_key") { /* play video */ } 

this crude example, can strip sessions altogether because you're using api calls. the_super_secret_key can retrieved database match session key sent.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -