I work with several pages where javascript submits the form when the page loads.
Does the curl library automatically execute javascript on web pages? If yes, then there is a way to return the modified DOM instead of the standard default, which I return with simple curl code.
Here is my current code:
$curl_handle=curl_init(); curl_setopt($curl_handle,CURLOPT_URL,$url); $buffer = curl_exec_follow($curl_handle,10); curl_setopt($curl_handle,CURLOPT_HEADER, 0); curl_setopt($curl_handle,CURLOPT_FOLLOWLOCATION, 1); $buffer = curl_exec($curl_handle);
javascript php curl
Bob cavezza
source share