if(event=="play"){ $.ajax({ type: "post", url: "video.php", data: {id: '.$kp.', dt: document.referrer} }); yaCounter51365005.reachGoal("playerjs_play"); } } 

document.referrer from another domain with https - I get an empty value, this is understandable, how can I get the value (domain) in ajax differently? $ _SERVER ['HTTP_REFERER'] does not quite work as it should, only gives its domain.

I want to get data from which "domain" the visitor is watching the iframe.

I have in all the files

 header('Access-Control-Allow-Origin: *'); 
  • I did not understand whose domain you want to get? - andreymal
  • @andreymal stranger, impossible? - Oberyn Martell
  • What kind of stranger? From which you went to your site? In general, this is not possible if this foreign site does not allow you to get yourself. Developer.mozilla.org/en-US/docs/Web/HTTP/Headers/… - andreymal
  • @andreymal maybe I incorrectly formulated the question, let's say the client has placed the iframe player from our source to itself (its site is in SSL), after launching the player, I only get the IP data, and the site’s domain is empty in the variable, this is exactly the case SSL, otherwise get in any way? - Oberyn Martell
  • You tell something strange, it seems that it is impossible to place an http-iframe on the https-site. If the iframe is also https, then there should be no particular problems - andreymal

0