PHP How to get Baidu Music API address! Tokyu

Source: Internet
Author: User
First file
 
  Query ("SELECT * from {$dbtbpre}ecms_yue where id = '". $id. ""); Query data table require (' template/yue.temp.php '); Import Template file}db_close (); Close the MySQL link $empire=null; ?> Action class variable


A second file
 
  Fetch ($SQL))        //Loop get query record {?>               {"SongID": 
 
   ,       },
 
  


The above is a PHP loop code 2 files

http://localhost:82/e/song/?id=1322
Connection is like this! Program is Imperial CMS
There's a music library in the datasheet! There are 2 fields under singers and titles

Get Baidu's music address by visiting one of the above addresses
Singers and titles directly through ID/?id=1322 to the Empire CMS to get the values of singers and titles
Below I simulate the way to get

 
  Fetch ($SQL))        //Loop get query record {?>               {"SongID": 
 
   ,               "songurl": Then output the music address in this,       },
 
   $$
 
  '; $lines _string=file_get_contents ($url); Eregi ('(.*)',  //  Grab the front section   eregi ('
 
  
   
  (. *)
 
  ',  //  crawl The back part  is the MP3 filename  $lines _string, $title); Echo htmlspecialchars ($title [0]); }?>   //Note  to remove the music connection Baidu  is not Baidu! to other stations!    //Baidu behind a number of garbled   play can't!       //   in removing WMA format! It's going to MP3!   random Output 1 data!    //Output only one  page refresh several times the output is changed  ! If you have more addresses, you'd better have the lyrics.


I wrote the above code! It's a mess!
I can't write PHP amount! It's only here!


Reply to discussion (solution)

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

  • Related Article

    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.