I have URL like this
www.example.com/abc/xyz
and when it is loaded it turns into the different url like:
www.example.com/abc/xyz#facet=c_State+s_FL+p14_2+r14_5g6tVndJ+n10_2+x10_2BLnMX+b5_0+h5_0+g3_0+f3_0+v_No Preference+t8_0+a30_0+u_0+k_0+q_0+w_false+j_Q+e_1+i_2
I just want the second url ..so that I can use that parameters to send the json data using curl.
The second url is requesting the json data so that I am not able to track it.I want that data using first URL.
Here is my code:
$url = "http://www.lennar.com/New-Homes/Florida/Tampa";
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION , false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
)
);
curl_setopt($ch, CURLOPT_URL, $url);
$result = curl_exec($ch);
curl_close($ch);
var_dump($result);
and My output is :
string '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us" xmlns:fb="http://ogp.me/ns/fb#" xmlns:og="http://opengraphprotocol.org/schema/">
<head id="Head1"><meta name="keywords" content="quality, new homes, home builder" />
<meta name="description" content="Lennar Homes: If a home builder provided everything you want and everything you need, and by doing so, was a'... (length=165671)