Js/php script no more working
Briefly

The primary issue seems to arise from the scope of the variable $thatwebsite; it is not recognized in website B when trying to load content from A.
In B, the JavaScript is loaded at the bottom of the page, which may not have access to the server-side variables set in the PHP head section.
Read at SitePoint Forums | Web Development & Design Community
[
|
]