The 2nd parameter to postMessage
is the "target origin". This is the domain where the page is located, not the name of the (php) file.
It needs to be something like:
window.opener.postMessage(data, "http://example.com");
See: https://developer.mozilla.org/en-US/docs/Web/API/Window.postMessage