2 server one authenticated user
<p>This is going to be weird sorry and hopefully I'm posting it on the right website.</p>

<p>I got this question from an interview. </p>

<p>If I got two servers, one media and the other hosting a website that require user authentication.</p>

<p>The user have to login to the website hosted in one server before accessing the media server. Only authenticated user can access the media and the media server.</p>

<p>I'm not sure how to go about this via PHP? I believe I can do this via sys admin and setting up kerberos server a ticketing system. But for PHP I can only think of maybe some form for RSA public-private key encryption? </p>

<p>Another solutions/hacks was to create some kind of hash and append it to the URL.</p>

<p>Or</p>

<p>Check the user IP? everytime the user access the media file?</p>

<p>Note, the company I applied for, the manager didn't seem very skill at all. So maybe there is no safe solution?</p>

<p>Note:</p>

<p>I'm pretty sure I can't use PHP's session it's contained in a server? Perhaps a cookie? Is that even safe...</p>

<p>Thank you in advance.</p>
