Visitors of a external Sharepoint site, will click a link and will be redirected to our site. Our site requires login, but we want the visitors from that Sharepoint site to be automatically logged in.
How safe is (or is it, at all?) to rely on HTTP_REFERER super-global in PHP? Or how should I accomplish this task?
If the PHP code is run on the same server/domain, you might be able to read the cookies. Otherwise, relying on REFERRER is a big security risk.
I would use Javascript to add some authentication information onto the end of the URL. Sharepoint can be a pain to add custom javascript though.