• 天晴不会冷
    了解作者
  • PHP
    开发工具
  • 80KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 3
    下载次数
  • 2019-04-01 21:57
    上传日期
PHP多站合一音乐搜索器源码 支持各大音乐平台API接口,根据音乐名称、歌手、ID、地址智能搜索,搜索音乐在线试听源码
PHP多站合一音乐搜索器源码.zip
内容介绍
# PHP Curl Class: HTTP requests made easy [![](https://img.shields.io/github/release/php-curl-class/php-curl-class.svg)](https://github.com/php-curl-class/php-curl-class/releases/) [![](https://img.shields.io/github/license/php-curl-class/php-curl-class.svg)](https://github.com/php-curl-class/php-curl-class/blob/master/LICENSE) [![](https://img.shields.io/travis/php-curl-class/php-curl-class.svg)](https://travis-ci.org/php-curl-class/php-curl-class/) [![](https://img.shields.io/packagist/dt/php-curl-class/php-curl-class.svg)](https://github.com/php-curl-class/php-curl-class/releases/) PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs. ![PHP Curl Class screencast](www/img/screencast.gif) --- - [Installation](#installation) - [Requirements](#requirements) - [Quick Start and Examples](#quick-start-and-examples) - [Available Methods](#available-methods) - [Security](#security) - [Troubleshooting](#troubleshooting) - [Run Tests](#run-tests) - [Contribute](#contribute) --- ### Installation To install PHP Curl Class, simply: $ composer require php-curl-class/php-curl-class For latest commit version: $ composer require php-curl-class/php-curl-class @dev ### Requirements PHP Curl Class works with PHP 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, and HHVM. ### Quick Start and Examples More examples are available under [/examples](https://github.com/php-curl-class/php-curl-class/tree/master/examples). ```php require __DIR__ . '/vendor/autoload.php'; use \Curl\Curl; $curl = new Curl(); $curl->get('https://www.example.com/'); if ($curl->error) { echo 'Error: ' . $curl->errorCode . ': ' . $curl->errorMessage . "\n"; } else { echo 'Response:' . "\n"; var_dump($curl->response); } ``` ```php // https://www.example.com/search?q=keyword $curl = new Curl(); $curl->get('https://www.example.com/search', array( 'q' => 'keyword', )); ``` ```php $curl = new Curl(); $curl->post('https://www.example.com/login/', array( 'username' => 'myusername', 'password' => 'mypassword', )); ``` ```php $curl = new Curl(); $curl->setBasicAuthentication('username', 'password'); $curl->setUserAgent('MyUserAgent/0.0.1 (+https://www.example.com/bot.html)'); $curl->setReferrer('https://www.example.com/url?url=https%3A%2F%2Fwww.example.com%2F'); $curl->setHeader('X-Requested-With', 'XMLHttpRequest'); $curl->setCookie('key', 'value'); $curl->get('https://www.example.com/'); if ($curl->error) { echo 'Error: ' . $curl->errorCode . ': ' . $curl->errorMessage . "\n"; } else { echo 'Response:' . "\n"; var_dump($curl->response); } var_dump($curl->requestHeaders); var_dump($curl->responseHeaders); ``` ```php $curl = new Curl(); $curl->setOpt(CURLOPT_FOLLOWLOCATION, true); $curl->get('https://shortn.example.com/bHbVsP'); ``` ```php $curl = new Curl(); $curl->put('https://api.example.com/user/', array( 'first_name' => 'Zach', 'last_name' => 'Borboa', )); ``` ```php $curl = new Curl(); $curl->patch('https://api.example.com/profile/', array( 'image' => '@path/to/file.jpg', )); ``` ```php $curl = new Curl(); $curl->patch('https://api.example.com/profile/', array( 'image' => new CURLFile('path/to/file.jpg'), )); ``` ```php $curl = new Curl(); $curl->delete('https://api.example.com/user/', array( 'id' => '1234', )); ``` ```php // Enable all supported encoding types and download a file. $curl = new Curl(); $curl->setOpt(CURLOPT_ENCODING , ''); $curl->download('https://www.example.com/file.bin', '/tmp/myfile.bin'); ``` ```php // Case-insensitive access to headers. $curl = new Curl(); $curl->download('https://www.example.com/image.png', '/tmp/myimage.png'); echo $curl->responseHeaders['Content-Type'] . "\n"; // image/png echo $curl->responseHeaders['CoNTeNT-TyPE'] . "\n"; // image/png ``` ```php // Clean up. $curl->close(); ``` ```php // Example access to curl object. curl_set_opt($curl->curl, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1'); curl_close($curl->curl); ``` ```php require __DIR__ . '/vendor/autoload.php'; use \Curl\MultiCurl; // Requests in parallel with callback functions. $multi_curl = new MultiCurl(); $multi_curl->success(function($instance) { echo 'call to "' . $instance->url . '" was successful.' . "\n"; echo 'response:' . "\n"; var_dump($instance->response); }); $multi_curl->error(function($instance) { echo 'call to "' . $instance->url . '" was unsuccessful.' . "\n"; echo 'error code: ' . $instance->errorCode . "\n"; echo 'error message: ' . $instance->errorMessage . "\n"; }); $multi_curl->complete(function($instance) { echo 'call completed' . "\n"; }); $multi_curl->addGet('https://www.google.com/search', array( 'q' => 'hello world', )); $multi_curl->addGet('https://duckduckgo.com/', array( 'q' => 'hello world', )); $multi_curl->addGet('https://www.bing.com/search', array( 'q' => 'hello world', )); $multi_curl->start(); // Blocks until all items in the queue have been processed. ``` More examples are available under [/examples](https://github.com/php-curl-class/php-curl-class/tree/master/examples). ### Available Methods ```php Curl::__construct($base_url = null) Curl::__destruct() Curl::__get($name) Curl::attemptRetry() Curl::beforeSend($callback) Curl::buildPostData($data) Curl::call() Curl::close() Curl::complete($callback) Curl::delete($url, $query_parameters = array(), $data = array()) Curl::download($url, $mixed_filename) Curl::error($callback) Curl::exec($ch = null) Curl::execDone() Curl::get($url, $data = array()) Curl::getCookie($key) Curl::getInfo($opt = null) Curl::getOpt($option) Curl::getResponseCookie($key) Curl::getResponseCookies() Curl::head($url, $data = array()) Curl::options($url, $data = array()) Curl::patch($url, $data = array()) Curl::post($url, $data = array(), $follow_303_with_post = false) Curl::progress($callback) Curl::put($url, $data = array()) Curl::removeHeader($key) Curl::search($url, $data = array()) Curl::setBasicAuthentication($username, $password = '') Curl::setConnectTimeout($seconds) Curl::setCookie($key, $value) Curl::setCookieFile($cookie_file) Curl::setCookieJar($cookie_jar) Curl::setCookieString($string) Curl::setCookies($cookies) Curl::setDefaultDecoder($mixed = 'json') Curl::setDefaultJsonDecoder() Curl::setDefaultTimeout() Curl::setDefaultUserAgent() Curl::setDefaultXmlDecoder() Curl::setDigestAuthentication($username, $password = '') Curl::setHeader($key, $value) Curl::setHeaders($headers) Curl::setJsonDecoder($mixed) Curl::setMaxFilesize($bytes) Curl::setOpt($option, $value) Curl::setOpts($options) Curl::setPort($port) Curl::setReferer($referer) Curl::setReferrer($referrer) Curl::setRetry($mixed) Curl::setTimeout($seconds) Curl::setUrl($url, $mixed_data = '') Curl::setUserAgent($user_agent) Curl::setXmlDecoder($mixed) Curl::success($callback) Curl::unsetHeader($key) Curl::verbose($on = true, $output = STDERR) MultiCurl::__construct($base_url = null) MultiCurl::__destruct() MultiCurl::addCurl(Curl $curl) MultiCurl::addDelete($url, $query_parameters = array(), $data = array()) MultiCurl::addDownload($url, $mixed_filename) MultiCurl::addGet($url, $data = array()) MultiCurl::addHead($url, $data = array()) MultiCurl::addOptions($url, $data = array()) MultiCurl::addPatch($url, $data = array()) MultiCurl::addPost($url, $data = array(), $follow_303_with_post = false) MultiCurl::addPut($url, $data = array()) MultiCurl::addSearch($url, $data = array()) MultiCurl::beforeSend($callback) MultiCurl::close() MultiCurl::complete($callback) MultiCurl::error($callback) MultiCurl::getOpt($option) MultiCurl::removeHeader($key) MultiCurl::setBasicAuthentication($username, $password = '') MultiCurl::setConcurrency($concurrency) MultiCurl::setConnectTimeout($seconds) MultiCurl::setCookie($key, $value) MultiCurl::setCookieFile($cookie_file) MultiCurl::setCookieJar($cookie_jar) MultiCurl::setCookieString($string) MultiCurl::setCookies($cookies) MultiCurl::setDigestAuthentication($username, $passw
评论
    相关推荐
    • PHP音乐聚合FM搜索在线播放
      搭建教程: ...2.开通好主机后,下载聚合FM搜索在线播放源码! 3.源码上传到根目录解压即可。 4.设置伪静态规则为thinkphp。 5.访问域名即可使用! 6.本期教程非常简单上传源码,解压源码就可以使用了。
    • Source音乐搜索 v1.02
      Source音乐搜索是一个用PHP进行开发的音乐网站源码,软件可以在后台进行音乐的添加,在前台可以对想要的音乐进行搜索,然后直接播放或者下载。 简洁、纯粹是我们开发的最初目的。
    • PHP音乐搜索引擎 歌词增强版本 A 完整版
      PHP音乐搜索引擎 歌词增强版本 A 完整版
    • music-php:音乐搜索和下载
      音乐PHP 音乐搜索和下载。 English | 要求 PHP> = 7.1 作曲家 安装 Phar文件下载和安装 在页面上下载或文件。 全局安装 $ composer global require guanguans/music-php --dev 当前目录安装 $ composer create-...
    • 哈佛.音乐&MTV.PHP搜索引擎
      极酷的音乐与MTV 搜索引擎,能搜索MP3,WAM和RM格式视频音乐文件,并能下载,必须有PHP空间才能安装,不需要MySQL数据库,能和sougua不相上下
    • Source音乐搜索 v1.01
      Source音乐搜索是一个用PHP进行开发的音乐网站源码,软件可以在后台进行音乐的添加,在前台可以对想要的音乐进行搜索,然后直接播放或者下载。 简洁、纯粹是我们开发的最初目的。
    • Source音乐搜索
      Source音乐搜索是一个用PHP进行开发的音乐网站源码,软件可以在后台进行音乐的添加,在前台可以对想要的音乐进行搜索,然后直接播放或者下载。 简洁、纯粹是我们开发的最初目的。 功能说明: 采用div+css界面设计,...
    • Source音乐搜索
      Source音乐搜索是一个用PHP进行开发的音乐网站源码,软件可以在后台进行音乐的添加,在前台可以对想要的音乐进行搜索,然后直接播放或者下载。 简洁、纯粹是我们开发的最初目的。 功能说明: 采用div+css界面设计,...
    • 搜几下搜索引擎集合php开源程序 v1.0
      使用搜几下您可以查找:百科、网页、音乐、图片、问答、视频、新闻、影视、软件、购物、词典、地图、生活、站长、游戏等。同时搜几下还有桌面搜索软件,您不需要打开网页就能开始搜索,让您更快人一步。 
    • PHP音乐歌曲搜索器 1.6.2
      PHP音乐歌曲搜索器是一款多站合一音乐搜索解决方案,支持搜索试听以下网站音乐:网易云音乐、QQ音乐、酷狗音乐、酷我音乐、虾米音乐、百度音乐、一听音乐、咪咕音乐、荔枝FM、蜻蜓FM、喜马拉雅FM、全民K歌、5sing原创...