<?php
include('Snoopy.class.php');
$snoopy = new Snoopy;
/*$snoopy->fetchtext($url);  //获取文本内容（去掉html代码）
$snoopy->fetch($url);    //获取所有内容
$snoopy->fetchlinks($url);   //获取链接
$snoopy->fetchform($url);    //获取表单
$snoopy->submit($url,$formdata);
$snoopy->results;      //显示结果
*/
$post = array(
    'return_data' => 'json',
    'act' => 'connectmobile:get_brand',
    'api_version' => '3.0',
);

$token = 'ad7a5b9037ddfdf088fec33b1808cbd62334db42e05e7a8942a88b2698b07699';

ksort($post);
$tmp = implode( '', array_values($post) );

// connectmobile:get_brand3.0json
//var_dump($tmp);

$post['ac'] = strtolower( md5($tmp.$token) );

$url="http://localhost/ykdby485/api.php";
$snoopy->submit($url, $post);

header("Content-Type:application/json,charset=UTF-8");
//header("Content-Type:text/xml");
echo $snoopy->results;

