I am working in a web based app , which have to show information to the users from their account on a 3rd party website they will provide their login details and i have to extract the data from thier account and show it on my web based application but the problem is The 3rd party site will not allow anyone else to access their account who dont have the ip which is registered in thier database . So , I cannot use any server-side or any type of proxy i must use user ip to send and receive the data for the site .
So my main question is “How to get cross domain request’s response in any client based language ” . I heard it is not possible as it is violation cross domain policy but i found some site which telling it can possible with JSONP and some src attribute . I am actually confused how to do it . I need an example of that method like i make a request to 3rd party site and able to read the resone sent by them .
Please help me .
Thanks
You cannot make your visitor’s browser issue HTTP requests to an arbitrary website and process the response in JavaScript.
If the 3rd party has built a JSON-P API, you can use that.
If the 3rd party supports CORS (and your visitor has a compatible browser then you can use XHR.
There is little point in going into detail about either of those methods unless you have been told that they are supported. (If the third party is locking their service down to specific IP addresses, I’d be surprised if either were supported).