search
HomeWeChat AppletWeChat DevelopmentWeChat public platform message interface development for online song request/online music

1. Obtain music resources

Baidu has a music interface,

http://box.zhangmen.baidu.com/x?op =12&count=1&title=About winter$$Qiqin$$$$

The returned result is

This XML file does not appear to have any style information associated with it. The document tree is shown below.<result><count>1</count><url><encode></encode><decode></decode><type>8</type><lrcid>14706</lrcid><flag>1</flag></url><durl><encode></encode><decode></decode><type>8</type><lrcid>14706</lrcid><flag>1</flag></durl><p2p><hash>d1cae9f7634c5aa3d54d7b1b1ad4c5b79b6e97ff</hash><url></url><type>mp3</type><size>5710896</size><bitrate>192</bitrate></p2p></result>

2. Connecting with WeChat

The music message format is as follows

WeChat public platform message interface development for online song request/online music

Parameter Description

ToUserName  接收方帐号(收到的OpenID)
FromUserName  开发者微信号
CreateTime  消息创建时间
MsgType  music
MusicUrl  音乐链接
HQMusicUrl  高质量音乐链接,WIFI环境优先使用该链接播放音乐
FuncFlag  位0x0001被标志时,星标刚收到的消息。

3. Core program implementation

WeChat public platform message interface development for online song request/online music

4. Effect Demonstration
You need to add the WeChat public account Fangbei Studio, you can see the relevant instructions

<span style="color: #000000;">1. 发送“点歌”加歌名,如“点歌最炫民族风”,返回指定的歌曲。<br></span>

The song plays smoothly in the WIFI environment and has a good experience.

This is the interface for successfully requesting songs

WeChat public platform message interface development for online song request/online music

This is the display at the top sidebar

WeChat public platform message interface development for online song request/online music

This is the music playback interface

WeChat public platform message interface development for online song request/online music

More WeChat public platform news For articles related to interface development and online song request/online music, please pay attention to the PHP Chinese website!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function