lopes_andre Posted October 9, 2010 Share Posted October 9, 2010 Hi, I need to post to a form with cURL. I'am sending strings in Headers format... There are some documentation or some function that translates from the human readable format to the Headers format? For example: Human readable format: Vendo bicicleta. Como nova. Headers format: Vendo%20bicicleta.%20Como%20nova. The problem is not the spaces but more the accents. I write in Portuguese. Can you give me some clue? Best Regards, Quote Link to comment Share on other sites More sharing options...
jl5501 Posted October 9, 2010 Share Posted October 9, 2010 the urlencode() function should provide what you need Quote Link to comment Share on other sites More sharing options...
PaulRyan Posted October 9, 2010 Share Posted October 9, 2010 jl5501: You are right, but rawurlencode() also encodes spaces with %20, unlike urlencode() The following is your friend $string = 'Vendo bicicletä. Como novä.'; $headerFormat = rawurlencode($string); The ä are just tests, try it out. Regards, Paul. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.