As stated on php manual urlencode is for encoding query part of url, so why should urlencode be used to encoded data before sending via curl too as these are $_POST values and not query part?
foreach ($data as $key => $value) {
$value = urlencode($value);
$req .= "&$key=$value";
}
//
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
If this is recommended to do, so why this is not necessary to encode posted data via form before processing a submitted form (not for curl, but just processing form I mean.) ?
Does this mean curl is sending data differently than a submitted form does?