I’m using the following code to get response from a requested page using php
$ch = curl_init('http://myPageURL/');
curl_setopt($ch, CURLOPT_HEADER, 1);
$c = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_HTTP_CODE);
Here the response is showing header and other info including body content.
but i only need the body content as a response, what would be the code to do it ?
thanks in advance
This will give the contents and I made it to add the content in the result variable and added some settings to make sure the content is received if the page you are going is redirecting to another.