Hi,
You can do one thing, make an ajax call to the server side code(test.php) running on domain1.com.

test.php will try to connect to the script located in domain2.com and will return you the...