Joseph,
I do not know if it's your knowledge, but it's something server side, which in your case is PHP. That is, it will not be in the HTML that you will correct, but in PHP. This is a matter related to the CORS or Cross-origin resource sharing. Please read the link I left.
By giving my explanation to help you in understanding, a web application can freely upload images, stylesheets, scripts, iframes, videos and plugins like Adobe Flash from any domain. However, web fonts and requests in Ajax are limited only to within the domain itself, and in your case, probably from an X domain you are either making an Ajax request for domain Y or loading the source of a Z domain.
This occurred once with me when a web application, which was in a domain ( link ), I performed an Ajax request on a web service that was in a different domain ( link ).
I have resolved by adding only the header of my web service the permission for this type of request. In my case it was Java, but since you are making use of PHP, the solution will be to add the following line of code:
header('Access-Control-Allow-Origin: *');
In the above code, we are releasing to requests from any and all domain, because, as is common in our world, *
indicates something like ALL . If you want to specify which specific domains you can request, just replace *
with the address like this:
header('Access-Control-Allow-Origin: http://meusite.com', false);
header('Access-Control-Allow-Origin: http://outrosite.com', false);
header('Access-Control-Allow-Origin: https://www.maisum.com', false);
I hope to have helped with something, anything leave a comment!