Answer the question
In order to leave comments, you need to log in
Cross domain request, javascript. How to get one number from a page?
There is a page with information on it. How to get one number from this data? Preferably pure JS, without connecting these newfangled libraries of yours.
The main problem is that I don't understand how to connect to the page. If you run the script on it, then everything is elementary, document.getElementsBy ... But from another page I don’t understand how to do the same. I was expecting something like connect("example.com"); document.getElementsBy ...
No matter how. I've been digging around, but never got close to finding a solution.
Maybe there is an example of code in pure JS with getting any data from any page?
Answer the question
In order to leave comments, you need to log in
without a server-side language, you won't crank if you want to steal data without the permission of that page.
what we need: we make a request to our server, and it is already looking at that page and parsing it, and we use the answer further.
I can help you implement.
If the site does not allow cross-domain requests for JS or Flash, then no way, proxy with your server, or maybe it makes sense to look for an API.
Let your friend allow cross-requests from your site or give pure js code, possibly also with referrer check. Or what he pumps out should be uploaded to your server.
Until I realized what the snag is and what the possibilities are.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question