web services - Can a php file securely accept requests from ANY other domain / website? -
i hope question isn't general. unsure post advice on otherwise:
i have html5 application living on webpage (to specific, it's webgl game published unity3d). want check url game runs , if doesn't match pre-approved list of urls, should "phone home" , ping php file on server, record referring url, , possibly email daily summary of these referrers.
example use-case: if copied game , installed on own website without permission, ping server , record game is.
i know how check url, know how call url, know cron job necessary emailing, etc...
what don't know , question here is: possible webgl game silently call own server else's or cross-domain security in way , block it? or cause prompt pop up? etc? don't know part , trying figure out need hire , scope of job. if it's not possible, i'd rather abandon idea completely.
just make sure enable cors in "php file" here how:
https://enable-cors.org/server_php.html
...you mentioned "phone home" if server hosted on home, make sure accessible outside, need static ip , open port(s) in firewall if have any.
, answer question: yes possible "phone home" silently.
that analytics tools do, take look:
https://unity3d.com/unity/features/analytics
Comments
Post a Comment