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

Regarding the processing of garbled codes

WBOY
Release: 2016-07-06 13:52:15
Original
1209 people have browsed it

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>
Copy after login

Use urldecode and then transfer the code.

Are you submitting to their API?

urldecode?

Shouldn’t it be urlencode encoding?

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template