Does something like CURL exist in JavaScript?
Moderator: General Moderators
Does something like CURL exist in JavaScript?
I need to scrape a page, but from the client's IP address. Is it possible to implement this using JavaScript?
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: Does something like CURL exist in JavaScript?
This sounds questionable at best and unnecessary unless you really have a good reason to do so.
Re: Does something like CURL exist in JavaScript?
I realize that, but there's no malintent; it's just so users can access other webpages directly without straining my own server from within an AIR app.
Re: Does something like CURL exist in JavaScript?
You can do it with iframe, but if you only need to get html, then you can do it with ajax (in responseText will be all html).
Re: Does something like CURL exist in JavaScript?
Aren't there security issues when calling a URL which is not on the same domain? I'm relatively new to JS, when trying this:
Nothing seems to happen...
Code: Select all
jQuery.get('http://google.com',null,function(data){alert(data);});Re: Does something like CURL exist in JavaScript?
Sorry, didn't thought about it.
Then only easy solution then will be iframe, but you won't be able to get content of the page for the same reason.
Then only easy solution then will be iframe, but you won't be able to get content of the page for the same reason.
Re: Does something like CURL exist in JavaScript?
Anyone know if there's a function built into AIR or something to make this possible?