且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PHP curl bad request 400 - mapquest地理编码

更新时间:2023-01-03 18:15:59

Like @Matt the ninja and @chiliNut suggested, I needed to look at the difference between the two requests.

The only difference was the spaces. I tried running the urlencode() php function as well as the rawurlencode() php function, and neither affected the result.

This is what I am using now instead of url encoding:

$urlForGeocodeURLEncoded = str_replace(' ', '%20', $urlForGeocode);