C # through listening to the lyrics server download lyrics

Source: Internet
Author: User

A blogger asks questions about making music player lyrics. To show the lyrics of course have lyrics, so last night spent a little time to do it,

Algorithm information from the network of a section of PHP code, the specific source is unknown.

The whole process of downloading lyrics is:

1, according to the singer and the name of the song to find a single list of lyrics

The server address is:

Http://ttlrcct2.qianqian.com/dll/lyricsvr.dll?sh?artist={0}&title={1}&flags=0

Unicode encoding string for singer name {0}

Unicode encoding string for the song name {1}

Attention

The singer name, the song name needs to go to the space, "'", converts to lowercase and so on operation.

Unicode encoding requires a byte conversion to 16, rather than a character.

2. The above operation gets the XML result similar to the following.

<?xml version="1.0" encoding="UTF-8"?>
<result>
  <lrc id="70437" artist="胡彦斌" title="男人 KTV"></lrc>
  <lrc id="204568" artist="胡彦斌" title="男人KTV"></lrc>
</result>

3, we choose one of the lyrics to download.

According to the choice of lyrics Id,artist,title generate a checksum string (code), the specific algorithm to see the source code.

Get the lyrics by ID and code to the address below.

Http://ttlrcct2.qianqian.com/dll/lyricsvr.dll?dl?id={0}&code={1}

{0}:id

{1}:code

This article supporting source code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.