基于 php 的影讯接口调用代码实例代码描述:基于 php 的影讯接口调用代码实例代码平台:聚合数据<!--?php // +-------------------------------------------------------------------- -- // | JuhePHP [ NO ZUO NO DIE ] // +-------------------------------------------------------------------- -- // | Copyright (c) 2010-2015 All rights reserved. // +-------------------------------------------------------------------- -- // | Author: Juhedata <info@--> // +-------------------------------------------------------------------- -- //---------------------------------- // 影视影讯检索调用示例代码- 聚合数据// 在线接口文档: s/94 //---------------------------------- header( 'Content-type:text/html;charset=utf-8' ); // 配置您申请的 appkey $appkey = "*********************" ; //************1. 影视搜索************ $url =" http://op./onebox/movie/video "; $params = array ( "key" => $appkey , // 应用 APPKEY( 应用详细页查询) "dtype" => "" , // 返回数据的格式,xml 或 json ,默认 json "q" => "" , // 影视搜索名称); $paramstring = http_build_query( $params ); $content = juhecurl( $url , $paramstring ); $result = json_decode( $content ,true); if ( $result ){ if ( $result [ 'error_code' ]== '0' ){ print_r( $result ); } else { echo $result [ 'error_code' ]. ":" . $result [ 'reason' ]; }} else { echo " 请求失败"; } //************************************************** //************2. 最近影讯************ $url =" http://op./onebox/movie/pmovie "; $params = array ( "key" => $appkey , // 应用 APPKEY( 应用详细页查询) "dtype" => "" , /
基于php的影讯接口调用代码实例 来自淘豆网m.daumloan.com转载请标明出处.