I am not able to fetch data using cURL in php AS I can do this using curl
command in terminal like below -
curl http://www.universalapplianceparts.com/search.aspx?find=w10130694
This command provide expected result in terminal.
I want same result in php using curl
Below is my php code -
$url = "http://www.universalapplianceparts.com/search.aspx?find=W10130694";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://www.universalapplianceparts.com/");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$output = curl_exec ($ch);
curl_close ($ch);
var_dump($output);
Please let me know why I am not getting same result using php curl as I am getting in terminal.
Thanks