本文整理汇总了PHP中tools::addQuarter方法的典型用法代码示例。如果您正苦于以下问题:PHP tools::addQuarter方法的具体用法?PHP tools::addQuarter怎么用?PHP tools::addQuarter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tools
的用法示例。
在下文中一共展示了tools::addQuarter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetchData
private static function fetchData($station, $time, $lang, $timeSel)
{
include "../includes/getUA.php";
$request_options = array("referer" => "http://api.irail.be/", "timeout" => "30", "useragent" => $irailAgent);
$body = "";
//we want data for 1 hour. But we can only retrieve 15 minutes per request
for ($i = 0; $i < 4; $i++) {
$scrapeUrl = "http://www.railtime.be/mobile/SearchStation.aspx";
$scrapeUrl .= "?l=EN&tr=" . $time . "-15&s=1&sid=" . stations::getRTID($station, $lang) . "&da=" . $timeSel . "&p=2";
$post = http_post_data($scrapeUrl, "", $request_options) or die("");
$body .= http_parse_message($post)->body;
$time = tools::addQuarter($time);
}
return $body;
}
示例2: fetchData
private static function fetchData($station, $time, $lang, $timeSel)
{
include "../includes/getUA.php";
$request_options = array("referer" => "http://api.irail.be/", "timeout" => "30", "useragent" => $irailAgent);
$body = "";
//we want data for 1 hour. But we can only retrieve 15 minutes per request
for ($i = 0; $i < 4; $i++) {
$scrapeUrl = "http://www.railtime.be/mobile/HTML/StationDetail.aspx";
$rt = stations::getRTID($station, $lang);
$rtname = $rt->rtname;
$rtid = $rt->rtid;
$scrapeUrl .= "?sn=" . urlencode($rtname) . "&sid=" . urlencode($rtid) . "&ti=" . urlencode($time) . "&da=" . urlencode($timeSel) . "&l=EN&s=1";
$post = http_post_data($scrapeUrl, "", $request_options) or die("");
$body .= http_parse_message($post)->body;
$time = tools::addQuarter($time);
}
return $body;
}