Javascript w/o browser
Moderator: General Moderators
Javascript w/o browser
I think I'm asking the impossible here, but what I need is some way to run javascript without a browser. There is information stored on another corporate server that they freely allow to be accessed through a javascript they circulate. The trouble is that I need to get that information and store it on my server, but without anyone needing to go to a webpage. Can this be done? Thanks.
First) I can't use a browser because the information needs to be retrieved automatically, without any user interaction. This is so I can store the information locally and work with it on my end
Second) This data is given to me in a javascript array. Its accessed by Javascript because that is the format the third party delivers the data in. I have no control over how I get the data - it is only available as a Javascript array.
Second) This data is given to me in a javascript array. Its accessed by Javascript because that is the format the third party delivers the data in. I have no control over how I get the data - it is only available as a Javascript array.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
This data is given to you as javascript source code (text), which then interpreted by your browser.pickle wrote:Second) This data is given to me in a javascript array. Its accessed by Javascript because that is the format the third party delivers the data in. I have no control over how I get the data - it is only available as a Javascript array.
Can't you get and parse that text using PHP?
Ya, that just occurred to me. Do you have any idea how to use PHP to retrieve the contents of a URL and either store it in a file or in a local variable? I'm researching it now, but if you know....... Thanks.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
you can use [php_man]file[/php_man]("http://somewhere.net/something.html");
Or, if you need to get the results of POST request use [php_man]cURL[/php_man] extension.
Or, if you need to get the results of POST request use [php_man]cURL[/php_man] extension.