簡易筆記:
<?php
$url = 'http://query.yahooapis.com/v1/public/yql';
$q = array();
$q['q']= 'select * from contentanalysis.analyze where text="你好嗎 台灣 生活樂趣";';
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, $url );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_POST, true );
curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query( $q ) );
echo curl_exec( $ch );
curl_close( $ch );
沒有留言:
張貼留言