How does php obtain Baidu Music API address! Urgent

Source: Internet
Author: User
How does php obtain Baidu Music API address! First urgent file
 Query ("select * from {$ dbtbpre} ecms_yue where id = '". $ id. "'"); // query the data table require ('Template/yue. temp. php '); // import template file} db_close (); // Close the MYSQL link $ empire = null; // injection operation variable?>


Second file
 Fetch ($ SQL) // Obtain query records cyclically {?> {"Songid ":
 ,},
 


Above is a php loop code 2 files

Http: // localhost: 82/e/song /? Id = 1322
The connection is like this! The program is the Emperor CMS
There is a music library in the data table! There are two fields under the singer and title

Access the address above to obtain the Baidu Music address.
The artist and title are directly indicated by ID /? Id = 1322 get the singer and title value from the Emperor CMS
The following is a simulated retrieval method.

 Fetch ($ SQL) // Obtain query records cyclically {?> {"Songid ":
 , "Songurl": output the music address here ,},
 $
 '; $ Lines_string = file_get_contents ($ url); eregi ('(.*)', // Capture the previous part of eregi ('
 
  
(.*)
 ', // Capture the MP3 file name $ lines_string, $ title); echo htmlspecialchars ($ title [0]);}?> // Note that Baidu's music connection should not be removed! For other sites! // You cannot play back multiple garbled characters behind Baidu! // Remove the wma format! MP3! Output 1 piece of data randomly! // Output only one page refresh several times. The output result is also changed! If there are too many addresses, you 'd better take the lyrics ID as a dish.


I wrote the above code in disorder! Write it in disorder!
I won't write PHP! Only here!


Reply to discussion (solution)

Http://blog.csdn.net/iloster/article/details/8694014

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.