比方說,我有這個功能,但我不知道該怎麼稱呼它......如何使用這個php函數?
echo getYoutubeSearchVideosFeeds($variables);
與我應該替換$哪些變量調用$ Q,$排序依據,$ startIndex和等等?
function getYoutubeSearchVideosFeeds($criteria) {
$url = 'http://gdata.youtube.com/feeds/api/videos?';
$q = urlencode($criteria['q']);
$orderby = $criteria['orderby']; // relevance, published, viewCount, rating
$startIndex = $criteria['start-index'];
$maxResults = $criteria['max-results'];
$author = $criteria['author'];
$format = $criteria['format'];
$lr = $criteria['lr']; // fr, en
$safeSearch = $criteria['safeSearch']; //none, moderate, strict
// more code
}
這個函數來自哪裏? – 2012-02-20 00:47:16