0
I have a chronic problem, I need a CURL request to execute codes also in Javascript.
Generally speaking, all posts and references point to the same answer, that Curl does not have the ability to execute code in Javascript, however I have already found API’s in Java that ran the CURL function promising to run code in Javascripts (such as HTML Unit, for example)however I noticed that these API’s were abandoned by the developers.
I would need something in this sense, because I need to interact that sites making requests via Javascript.
It is no use to see the request by the browser and put it on Curl, this Javascript code aims precisely to prevent the interaction by webservices, creating Javascript keys that are sent to the server to release the next request.
In short, I need some API, code, Facility or technology that can simulate a browser by enabling Curl requests but running Javascripts as promised by this Htmlunit api.
The ideal would be in PHP language, but I believe it does not exist, in the absence of JAVA solves.
Could someone please assist me in this problem?
Let me understand. You want CURL to call the server that will return some content. I didn’t understand when Javascript should run why. Will this javascript already be on the server or will it be sent by CURL? What exactly javascript will do and what exactly the server should return?
– Shura16
Many websites place code in javascript to prevent robots from accessing data or posting certain posts. For example, sending as a given hiddem in a web form a code generated dynamically in the browser, is a way to make sure that is a user accessing. If CURL could run javascript it would generate this code and return this post as a perfect browser. It is no use to study the generated code, the algorithm, besides complex, changes all the time making the site can not be accessed via Curl, as the judicial sites for example or even google.
– MMcarlos