I want to fetch values from a url along with some parameters.I use the following code
$ch = curl_init("http://www.xzxxz.ca/api/Listing.svc/PropertySearch_Post?ApplicationId=1&BathRange=0-0&BedRange=0-0&CultureId=1&CurrentPage=1&LatitudeMax=60.500524687194485&LatitudeMin=56.46248967233933&LongitudeMax=-27.4658203125&LongitudeMin=-145.5029296875&MaximumResults=9&ParkingSpaceRange=0-0&PriceMax=0&PriceMin=0&PropertyTypeId=300&RecordsPerPage=9&SortBy=1&SortOrder=A&TransactionTypeId=2&viewState=m&cookiecheck=1");
$fp = fopen("collected.txt", "w");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($fp);
while using this code '405 - HTTP verb used to access this page is not allowed.' is shown.Is this due to the .svc file format or mistake in parameters passing?
POST, the web site only allows aGET)