本文整理汇总了PHP中buildUrl函数的典型用法代码示例。如果您正苦于以下问题:PHP buildUrl函数的具体用法?PHP buildUrl怎么用?PHP buildUrl使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了buildUrl函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getToken
/**
* 获取用户token
* 向该地址获取用户的token,用于换取用户openid:https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxea75c703e3c51ec3&redirect_uri=http%3A%2F%2F119.29.12.215%2FMobile%2FPublic%2Fbangding&response_type=code&scope=snsapi_base#wechat_redirect
*/
private function getToken($jumpUrl)
{
$url = "https://open.weixin.qq.com/connect/oauth2/authorize";
//$jumpUrl :::: "http://119.29.12.215/Mobile/Public/loginBangding"; //回调地址 js urlencode
$jumpUrl = $jumpUrl;
$getData['appid'] = C('AppID');
$getData['redirect_uri'] = iconv("utf-8", "gb2312//IGNORE", $jumpUrl);
$getData['response_type'] = 'code';
$getData['scope'] = 'snsapi_base';
$getData['raw_string'] = '#wechat_redirect';
$queryString = buildUrl($getData);
$url = $url . "?" . $queryString;
redirect($url);
}
示例2: buildUrl
function buildUrl($length, $prefix = '')
{
for ($j = 97; $j < 123; $j++) {
if ($length > 1) {
buildUrl($length - 1, $prefix . chr($j));
} else {
$last = $prefix . chr($j) . '';
for ($i = 1; $i < 26; $i = ++$i) {
$page = '&page=' . $i;
//$fullUrl = 'https://www.nremt.org/nremt/about/displayEMTDetail.asp?state=OH&last=' . '' . $last . '' . $page . chr(13) . chr(10);
$fullUrl = '"https://www.nremt.org/nremt/about/displayEMTDetail.asp?state=OH&last=' . '' . $last . '' . $page . '",';
echo $fullUrl;
}
}
}
}
示例3: buildUrl
function buildUrl($length, $prefix = '')
{
global $sources;
for ($j = 97; $j < 123; $j++) {
if ($length > 1) {
buildUrl($length - 1, $prefix . chr($j));
} else {
$last = $prefix . chr($j) . '';
for ($i = 1; $i < 2; $i = ++$i) {
$page = '&page=' . $i;
$fullUrl = 'https://www.nremt.org/nremt/about/displayEMTDetail.asp?state=NJ&last=' . '' . $last . '' . $page . chr(13) . chr(10);
echo $fullUrl;
array_push($sources, $fullUrl);
//save url to array
}
}
}
}
示例4: buildUrl
function buildUrl($length, $prefix = '')
{
global $sources;
for ($j = 97; $j < 123; $j++) {
if ($length > 1) {
buildUrl($length - 1, $prefix . chr($j));
} else {
$last = $prefix . chr($j) . '';
for ($i = 1; $i < 5; $i = ++$i) {
$page = '&showpage=' . $i;
$fullUrl = 'https://www.njoemscert.com/extCertView/index.cfm?fuseaction=SearchUsers&Search=Search&vchLastName=' . '' . $last . '' . $page . chr(13) . chr(10);
echo $fullUrl;
array_push($sources, $fullUrl);
//save url to array
}
}
}
}
示例5: testBuildUrl
public function testBuildUrl()
{
$url = "endpoint?key=value&another=weird==thing";
$this->assertEquals("endpoint?key=value&another=weird%3D%3Dthing&third=val", buildUrl($url, ['third' => 'val']));
}
示例6: catch
echo '<span class="label label-info pull-right" style="font-size : 1em;">' . config::byKey('market::username');
try {
market::test();
echo ' <i class="fa fa-check"></i>';
} catch (Exception $e) {
echo ' <i class="fa fa-times"></i>';
}
echo '</span>';
}
?>
</div>
</form>
</div>
<?php
if ($name != null && strpos($name, '$') !== false) {
echo '<a class="btn btn-default" id="bt_returnMarketList" style="margin-top : 50px;" data-href=' . buildUrl('name', '') . '><i class="fa fa-arrow-circle-left"></i> {{Retour}}</a>';
}
?>
<div style="padding : 5px;">
<?php
$categorie = '';
$first = true;
$nCategory = 0;
foreach ($markets as $market) {
$update = update::byLogicalId($market->getLogicalId());
$category = $market->getCategorie();
if ($category == '') {
$category = 'Aucune';
}
示例7: buildUrl
<div id="endtimebox">
<a alt="End 1 day earlier" href="<?php
echo buildUrl('endtime') . '&endtime=' . ($endtime - 60 * 60 * 24);
?>
">«</a>
<a alt="End 1 hour earlier" href="<?php
echo buildUrl('endtime') . '&endtime=' . ($endtime - 60 * 60);
?>
">‹</a>
endtime
<a alt="End 1 hour later" href="<?php
echo buildUrl('endtime') . '&endtime=' . ($endtime + 60 * 60);
?>
">›</a>
<a alt="End 1 day later" href="<?php
echo buildUrl('endtime') . '&endtime=' . ($endtime + 60 * 60 * 24);
?>
">»</a>
</div>
</div>
</div>
<?php
}
?>
<h1>Add Sensor</h1>
<form class="tableform" action="index.php" method="POST">
<div>
<lable for="uid">UID:</lable>
<input id="uid" name="uid" type="text" required="required"/>
</div>
示例8: buildUrl
}
if ($cmd != "downl") {
if ($isMainMenu != true) {
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" style="class="silver border">
<center><strong>
<?php
echo buildUrl("<font color=\"navy\">[ Main Menu ] </font>", "cmd=&dir=");
?>
<?php
echo buildUrl("<font color=\"navy\">[ R00T ] </font>", "cmd=dir&dir=.");
?>
</strong></center>
</td>
</tr>
</table>
<br>
<?php
}
?>
<table width=100% border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" class="silver border">
<center> <?php
include $a . $b . $c;
示例9: buildUrl
<td width="100%" style="class="silver border">
<center><strong>
<?php
echo buildUrl("<font color=\"navy\">[ Main Menu ] </font>", "cmd=&dir=");
?>
<?php
echo buildUrl("<font color=\"navy\">[ PHPKonsole ] </font>", "cmd=con");
?>
<?php
echo buildUrl("<font color=\"navy\">[ Haxplorer ] </font>", "cmd=dir&dir=.");
?>
</strong></center>
</td>
</tr>
</table>
<br>
<?php
}
示例10: array
}
}
$pageParams = array('elementsBefore' => $elements['before'], 'elementsAfter' => $elements['after'], 'pagesBefore' => ceil($elements['before'] / $elements['display']), 'pagesAfter' => ceil($elements['after'] / $elements['display']));
if (!is_null($beforeStart)) {
$tpl = $DLObj->getCFGDef('TplPrevP', '@CODE: <a href="[+url+]">Назад</a>');
$beforePage = $DLObj->parseChunk($tpl, array_merge($pageParams, array('url' => buildUrl($DLObj->getUrl(), $beforeStart), 'offset' => $beforeStart, 'elements' => $elements['before'], 'pages' => ceil($elements['before'] / $elements['display']))));
} else {
if ($DLObj->getCFGDef("PrevNextAlwaysShow", 0)) {
$tpl = $DLObj->getCFGDef('TplPrevI', '@CODE: Назад');
$beforePage = $DLObj->parseChunk($tpl, array_merge($pageParams, array('elements' => $elements['before'], 'pages' => ceil($elements['before'] / $elements['display']))));
}
}
$modx->setPlaceholder('pages.before', $beforePage);
if (!is_null($afterStart)) {
$tpl = $DLObj->getCFGDef('TplNextP', '@CODE: <a href="[+url+]">Далее</a>');
$afterPage = $DLObj->parseChunk($tpl, array_merge($pageParams, array('url' => buildUrl($DLObj->getUrl(), $afterStart), 'offset' => $afterStart, 'elements' => $elements['after'], 'pages' => ceil($elements['before'] / $elements['display']))));
} else {
if ($DLObj->getCFGDef("PrevNextAlwaysShow", 0)) {
$tpl = $DLObj->getCFGDef('TplNextI', '@CODE: Далее');
$afterPage = $DLObj->parseChunk($tpl, array_merge($pageParams, array('elements' => $elements['after'], 'pages' => ceil($elements['before'] / $elements['display']))));
}
}
$modx->setPlaceholder('pages.after', $afterPage);
$debug = $DLObj->getCFGDef('debug', 0);
if ($debug) {
if ($debug > 0) {
$out = $DLObj->debug->showLog() . $out;
} else {
$out .= $DLObj->debug->showLog();
}
}
示例11: chr
global $sources;
for ($i = 10605; $i <= 300000; $i++) {
//for($i = 99000; $i <= 100000; $i++) {
$fullUrl = 'https://myoracle.in.gov/reports/rwservlet?acadisepnhtml&report=acadis_person_detail.rdf&p_personid=' . '' . $i . '' . chr(13) . chr(10);
echo $fullUrl;
array_push($sources, $fullUrl);
//save url to array
}
}
/*https://myoracle.in.gov/reports/rwservlet?acadisepnhtml&report=acadis_person_detail.rdf&p_personid=*/
error_reporting(0);
require 'scraperwiki/simple_html_dom.php';
//stores list of urls
$sources = array();
//build urls and save to $sources
buildUrl();
//iterate through sources
foreach ($sources as $page) {
set_time_limit(0);
$html = scraperWiki::scrape($page);
$dom = new simple_html_dom();
$dom->load($html);
$store_arr = array();
$counter = 0;
foreach ($dom->find('<font face=') as $tds) {
//echo $tds->plaintext . chr(13) . chr(10);
$result = $tds->plaintext;
$store_arr[$counter++] = $result;
//echo 'Result: ' . $result . chr(13) . chr(10);
}
//- end foreach
开发者ID:flyeven,项目名称:scraperwiki-scraper-vault,代码行数:31,代码来源:indiana_-_hs_-_1_-_full_-_buildsources.php
示例12: buildUrl
</form>
<hr>
<table border=1 width=50%>
<tr>
<th><a href="index.php?orderby=id<?php
echo buildUrl();
?>
">id</a></th>
<th><a href="index.php?orderby=name<?php
echo buildUrl();
?>
">Name</a></th>
<th><a href="index.php?orderby=email<?php
echo buildUrl();
?>
">Email</a></th>
<th><a href="index.php?orderby=phone<?php
echo buildUrl();
?>
">Phone</a></th>
<th><a href="index.php?orderby=date<?php
echo buildUrl();
?>
">Date</a></th>
</tr>
<?php
showTable();
?>
</table>
</body>
</html>
示例13: http_request
/**
* 发送http请求
* @param $data 需要发送的数据。array
* @param $url 请求的地址
* @param $ispost 是否用post,默认post,false则使用get方式
* @return 请求结果
* @author wangxianlei
*/
function http_request($data, $url, $ispost = true)
{
if (!$ispost && !empty($data)) {
$queryString = buildUrl($data);
$url = $url . "?" . $queryString;
}
//echo $url;
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
//兼容https
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//返回不输出
//设置是通过post还是get方法 CURLOPT_HTTPGET
if ($ispost) {
curl_setopt($ch, CURLOPT_POST, 1);
//传递的变量
// curl_setopt($ch,CURLOPT_HTTPHEADERS,array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
}
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
示例14: getActionUrl
public function getActionUrl(array $params = NULL)
{
return buildUrl(fruitframe_get_permalink($this->_action), $params);
}
示例15: Memcache
$cache_host = $config['memcache_host'];
$cache_port = $config['memcache_port'];
$memcache = new Memcache();
$memcache->connect($cache_host, $cache_port) or die('Couldn\'t connect to memcache server. Is it running?');
// Set the API sport, endpoint, id, format, and any parameters
$host = 'erikberg.com';
$sport = '';
$endpoint = 'events';
$id = '';
$format = 'json';
$parameters = ['sport' => 'nba', 'date' => date('Ymd')];
if (isset($_GET['d'])) {
$parameters['date'] = $_GET['d'];
}
// Pass endpoint, format, and parameters to build request url
$url = buildUrl($host, $sport, $endpoint, $id, $format, $parameters);
$response = $memcache->get($url);
if (!$response) {
$response = httpGet($user_agent, $auth_header, $url);
if ($response != null) {
save_cache($memcache, $url, $response);
}
}
$events = json_decode($response);
// Create DateTime object using the ISO 8601 formatted events_date
$date = DateTime::createFromFormat(DateTime::W3C, $events->events_date);
?>
<!DOCTYPE html>
<html>
<head>