Home >Backend Development >PHP Tutorial >Regarding the processing of garbled codes

Regarding the processing of garbled codes

WBOY
WBOYOriginal
2016-07-06 13:52:151208browse

www.smsbao.com (SMS Bao) has an SMS uplink receiving API.

API description is:

http://xxx.xxx.xxx/ xxx?m=PHONE&c=CONTENT
http://xxx.xxx.xxx/xxx: URL address for receiving text messages
PHONE: Sender’s mobile phone number
CONTENT: SMS content, using UTF-8 URL ENCODE
Returning '0' is considered successful reception, other content is error prompt content

I used the urldecode() function to decode the text message content, but it was still garbled. How to solve it? Thanks!

Attachment:

Send test content via mobile phone:

66666successful success! @#

Decoded content:

66666successfulæˆåŠŸï¼@#

Reply content:

www.smsbao.com (SMS Bao) has an SMS uplink receiving API.

API description is:

http://xxx.xxx.xxx/ xxx?m=PHONE&c=CONTENT
http://xxx.xxx.xxx/xxx: URL address for receiving text messages
PHONE: Sender’s mobile phone number
CONTENT: SMS content, using UTF-8 URL ENCODE
Returning '0' is considered successful reception, other content is error prompt content

I used the urldecode() function to decode the text message content, but it was still garbled. How to solve it? Thanks!

Attachment:

Send test content via mobile phone:

66666successful success! @#

Decoded content:

66666successfulæˆåŠŸï¼@#

<code>iconv('gbk','utf-8//IGNORE',$content);</code>

Use urldecode and then transfer the code.

Are you submitting to their API?

urldecode?

Shouldn’t it be urlencode encoding?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn