예제 #1
0
class getinfo extends getprice
{
    function post()
    {
        $all_goods = "";
        //所有的商店的价格和url链接
        $goodsname = @$_POST['goodsname'];
        $goodsname = urlencode($goodsname);
        $taobao = parent::taobao($goodsname);
        $all_goods .= $this->confirm($taobao);
        $tmall = parent::tmall($goodsname);
        $all_goods .= $this->confirm($tmall);
        echo $all_goods;
        //$goods=json_encode($goods);
    }
    //转换成字符串
    function confirm($goods)
    {
        $goods_re = "";
        if (is_array($goods)) {
            foreach ($goods as $key => $value) {
                $goods_re .= "!!" . $value[0] . "!!" . $value[1];
            }
            return $goods_re;
        } else {
            return "!!" . $goods;
        }
    }
}
$final = new getinfo();
$final->post();
예제 #2
0
파일: manage.php 프로젝트: HToTH/php-manage
            } else {
                echo "权限不足或者未知错误";
            }
        } else {
            if ($action == "someports") {
                if ($ports != "all") {
                    $port = explode(',', $ports);
                    foreach ($port as $key) {
                        echo $key;
                    }
                }
            }
        }
    }
}
$getinfo = new getinfo();
$files_info = $getinfo->get();
$files_info[1] = iconv('gb2312', 'utf-8', $files_info[1]);
$cmd_result = $getinfo->post();
$html = <<<html
  <html>yunker.cc
\t<head>
\t\t<title>yunker.cc manage</title>
\t\t<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
\t</head>
\t<style type="text/css">
\t\thtml,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
\t\t    margin: 0;
\t\t    padding: 0;
\t\t    font-family: 'Comic Sans MS', cursive,'幼圆';
\t\t}