I want to write a Google Chrome Extension that can take information from a site that I do not own (www.notmysite.com), send that info to a site I do own (www.mysite.com), and do some sort of MySQL query with that information on my site.
For example, I’d like to be able to take some javascript variable that I’ve parsed from the HTML on http://www.notmysite.com and INSERT it in the MySQL database on http://www.mysite.com. I have no problem making XMLHttpRequests from one http://www.notmysite.com page to another, but am running into cross-domain scripting restrictions when I try to connect to http://www.mysite.com.
Is there a way around this? It seems like there should be since I own http://www.mysite.com!
(This is essentially a screen scraping problem. I want to screen scrape straight to a database.)
You can avoid cross domain restrictions if you run your ajax call from a background page (not from a content script) and have corresponding domain permissions declared in manifest file.