本文整理汇总了PHP中geturl函数的典型用法代码示例。如果您正苦于以下问题:PHP geturl函数的具体用法?PHP geturl怎么用?PHP geturl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了geturl函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: GetMUSites
function GetMUSites($page = '')
{
global $cookie, $domain;
if (empty($page)) {
$page = geturl($domain, 80, "/", 0, $cookie);
is_page($page);
if (preg_match('@Location: http://([^/|\\r|\\n]+)/@i', $page, $rd)) {
$domain = $rd[1];
$page = geturl($domain, 80, "/", 0, $cookie);
is_page($page);
}
$cookie = GetCookiesArr($page);
}
if (!preg_match_all("@showdetails\\('(\\w+)'\\)@i", $page, $hosts)) {
html_error('Cannot Check Supported Sites [1]');
}
$sites = array();
foreach ($hosts[1] as $host) {
$popup = cut_str($page, 'id="details_' . $host . '">', '</div></div>');
if (empty($popup) || (!preg_match('@"(?:http://[^"]+/)?logos/(\\d+)\\.[^"]+"@i', $popup, $hid) || !preg_match('@Upload files directly into my ([^\\"|\'|\\<|\\:]+) account\\:@i', $popup, $name))) {
html_error("Cannot Check Supported Sites [2 ({$host})]");
}
$name[1] = trim($name[1]);
if ($hid[1] != 14) {
$sites[] = array('hname' => $name[1], 'id' => $hid[1], 'sname' => $host);
}
unset($popup, $hid, $name);
}
return $sites;
}
开发者ID:mewtutorial,项目名称:RapidTube,代码行数:30,代码来源:multiupload.com_member.php
示例2: SendLogin
function SendLogin($post)
{
global $_T8, $referer, $cookie, $pauth;
$page = geturl($_T8['domain'], $_T8['port'], $_T8['path'] . '?op=login', $referer, $cookie, 0, 0, $_GET['proxy'], $pauth);
is_page($page);
if (!($form = cut_str($page, '<form', '</form>'))) {
html_error('Cannot find login form.');
}
if (!($post['rand'] = cut_str($page, 'name="rand" value="', '"'))) {
html_error('Login form "rand" not found.');
}
if (substr_count($form, "<span style='position:absolute;padding-left:") > 3 && preg_match_all("@<span style='[^\\'>]*padding-left\\s*:\\s*(\\d+)[^\\'>]*'[^>]*>((?:&#\\w+;)|(?:\\d))</span>@i", $form, $txtCaptcha)) {
// Text Captcha (decodeable)
$txtCaptcha = array_combine($txtCaptcha[1], $txtCaptcha[2]);
ksort($txtCaptcha, SORT_NUMERIC);
$txtCaptcha = trim(html_entity_decode(implode($txtCaptcha), ENT_QUOTES, 'UTF-8'));
$post['code'] = $txtCaptcha;
} else {
html_error('Login captcha not found.');
}
// Don't remove this sleep or you will only see "Error Decoding Captcha. [Login]"
sleep(3);
// 2 or 3 seconds.
$page = geturl($_T8['domain'], $_T8['port'], $_T8['path'] . '?op=login', $referer, $cookie, $post, 0, $_GET['proxy'], $pauth);
is_page($page);
is_present($page, '>Wrong captcha code<', 'Error: Error Decoding Captcha. [Login]');
return $page;
}
开发者ID:Transcodes,项目名称:rapidleech,代码行数:28,代码来源:ex-load.com.php
示例3: GetPage
public function GetPage($link, $cookie = 0, $post = 0, $referer = 0, $auth = 0, $XMLRequest = 0)
{
if (!$referer && !empty($GLOBALS['Referer'])) {
$referer = $GLOBALS['Referer'];
}
$cURL = $GLOBALS['options']['use_curl'] && extension_loaded('curl') && function_exists('curl_init') && function_exists('curl_exec') ? true : false;
$Url = parse_url(trim($link));
if (strtolower($Url['scheme']) == 'https') {
$chttps = false;
if ($cURL) {
$cV = curl_version();
if (in_array('https', $cV['protocols'], true)) {
$chttps = true;
}
}
if (!extension_loaded('openssl') && !$chttps) {
html_error('You need to install/enable PHP\'s OpenSSL extension to support HTTPS connections.');
} elseif (!$chttps) {
$cURL = false;
}
}
if ($cURL) {
if ($XMLRequest) {
$referer .= "\r\nX-Requested-With: XMLHttpRequest";
}
$page = cURL($link, $cookie, $post, $referer, $auth);
} else {
global $pauth;
$page = geturl($Url['host'], defport($Url), $Url['path'] . (!empty($Url['query']) ? '?' . $Url['query'] : ''), $referer, $cookie, $post, 0, !empty($_GET['proxy']) ? $_GET['proxy'] : '', $pauth, $auth, $Url['scheme'], 0, $XMLRequest);
is_page($page);
}
return $page;
}
开发者ID:korosh-MD,项目名称:rapidleech,代码行数:33,代码来源:DownloadClass.php
示例4: GetPage
public function GetPage($link, $cookie = 0, $post = 0, $referer = 0, $auth = 0, $XMLRequest = 0)
{
global $options;
if (!$referer) {
global $Referer;
$referer = $Referer;
}
$cURL = $options['use_curl'] && extension_loaded('curl') && function_exists('curl_init') && function_exists('curl_exec') ? true : false;
$Url = parse_url(trim($link));
if ($Url['scheme'] == 'https') {
$chttps = false;
if ($cURL) {
$cV = curl_version();
if (in_array('https', $cV['protocols'], true)) {
$chttps = true;
}
}
if (!extension_loaded('openssl') && !$chttps) {
html_error('This server doesn\'t support https connections.');
} elseif (!$chttps) {
$cURL = false;
}
}
if ($cURL) {
if ($XMLRequest) {
$referer .= "\r\nX-Requested-With: XMLHttpRequest";
}
$page = cURL($link, $cookie, $post, $referer, $auth);
} else {
global $pauth;
$page = geturl($Url['host'], defport($Url), $Url['path'] . (!empty($Url['query']) ? '?' . $Url['query'] : ''), $referer, $cookie, $post, 0, !empty($_GET['proxy']) ? $_GET['proxy'] : '', $pauth, $auth, $Url['scheme'], 0, $XMLRequest);
is_page($page);
}
return $page;
}
开发者ID:sayedharounokpay,项目名称:LikesPlanet,代码行数:35,代码来源:DownloadClass.php
示例5: rapportive
function rapportive($email)
{
$json_str = geturl('https://rapportive.com/contacts/email/' . $email);
$json = json_decode($json_str);
if ($json === false) {
return "<p>Failed to load Rapportive</p>";
}
if (!isset($json->contact)) {
return "<p>No information found</p>";
}
$out = "<div>";
if (isset($json->contact->image_url_raw) && strlen($json->contact->image_url_raw)) {
$out .= "<img style='float:left;margin-right:5px;margin-bottom:5px;;' width='75px' height='75px' src='{$json->contact->image_url_raw}'> ";
}
if (isset($json->contact->name) && strlen($json->contact->name)) {
$out .= "<strong>{$json->contact->name}</strong><br>";
}
if (isset($json->contact->email) && strlen($json->contact->email)) {
$out .= "<a href='mailto:{$email}'>{$email}</a><br>";
}
if (isset($json->contact->location) && strlen($json->contact->location)) {
$out .= "{$json->contact->location}</div>";
}
$out .= "<div style='clear:both;'></div>";
foreach ($json->contact->occupations as $o) {
$out .= "• {$o->job_title} at {$o->company}<br>";
}
foreach ($json->contact->memberships as $m) {
$out .= "<div style='float:left;margin-right:5px;'><img src='https://rapportive.com/images/icons/{$m->icon_name}.png'> ";
$out .= "<a href='{$m->profile_url}'>{$m->formatted}</a></div>";
}
$out .= "<div style='clear:both;'></div>";
return $out;
}
开发者ID:yuantw,项目名称:Shine,代码行数:34,代码来源:functions.inc.php
示例6: SendLogin
function SendLogin($post)
{
global $_T8, $cookie, $pauth;
$page = geturl($_T8['domain'], $_T8['port'], $_T8['path'] . '?op=login', 'https://login.uptobox.com/', $cookie, $post, 0, $_GET['proxy'], $pauth);
is_page($page);
return $page;
}
开发者ID:haziriamin,项目名称:rapidleech,代码行数:7,代码来源:uptobox.com_member.php
示例7: SendLogin
function SendLogin($post)
{
global $_T8, $cookie, $pauth;
$page = geturl('login.uptobox.com', 443, '/logarithme', 'https://login.uptobox.com/', $cookie, $post, 0, 0, 0, 0, 'https');
// geturl doesn't support https proxy
is_page($page);
return $page;
}
开发者ID:Transcodes,项目名称:rapidleech,代码行数:8,代码来源:uptobox.com_member.php
示例8: getImagePath
/**
* 获取图片路劲
*
* @return string
*/
function getImagePath()
{
$imagePath = geturl($this->fileName);
if ($imagePath[0]) {
return $imagePath[0];
}
return '';
}
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:13,代码来源:advupload.class.php
示例9: doChangeLocale
public function doChangeLocale()
{
$locale = Input::get('locale');
LaravelLocalization::setLocale($locale);
App::setLocale($locale);
Cookie::queue('locale', $locale);
return Response::json(array('status' => true, 'link' => geturl(Input::get('url'))));
}
开发者ID:OlesKashchenko,项目名称:SkillsProject1,代码行数:8,代码来源:HomeController.php
示例10: _getGroupImage
function _getGroupImage($cnimg)
{
if (!$cnimg) {
global $imgpath;
return $imgpath . '/g/groupnopic.gif';
}
list($cnimg) = geturl("cn_img/{$cnimg}", 'lf');
return $cnimg;
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:9,代码来源:groupsource.class.php
示例11: _getImagesByTid
function _getImagesByTid($tid)
{
global $db;
$temp = array();
$query = $db->query("SELECT attachurl FROM pw_attachs WHERE tid=" . S::sqlEscape($tid, false) . " AND type='img' LIMIT 5");
while ($rt = $db->fetch_array($query)) {
$a_url = geturl($rt['attachurl'], 'show');
$temp[] = is_array($a_url) ? $a_url[0] : $a_url;
}
return $temp;
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:11,代码来源:subjectrelatedata.class.php
示例12: checkuser
function checkuser($id, $space)
{
global $_SGLOBAL;
if (empty($space)) {
showmessage('link_failure', geturl('action/login'));
}
list($dateline, $operation, $idstring) = explode("\t", $space);
if ($dateline < $_SGLOBAL['timestamp'] - 86400 * 3 || $operation != 1 || $idstring != $id) {
showmessage('getpasswd_illegal');
}
}
开发者ID:superman1982,项目名称:ng-cms,代码行数:11,代码来源:do_lostpasswd.php
示例13: onGetValue
public function onGetValue($formField, array &$row, &$postfix)
{
if ($row) {
if ($formField->getFieldName() == 'id_catalog') {
if ($row['id_catalog']) {
$product = Tree::find($row['id_catalog']);
return '<a href="' . geturl($product->getUrl()) . '" target="_blank">' . $product->title_ru . '</a>';
}
}
}
}
开发者ID:OlesKashchenko,项目名称:SkillsProject1,代码行数:11,代码来源:ApplyFormTableHandler.php
示例14: GetPage
/**
* You can use this function to retrieve pages without parsing the link
*
* @param string $link The link of the page to retrieve
* @param string $cookie The cookie value if you need
* @param array $post name=>value of the post data
* @param string $referer The referer of the page, it might be the value you are missing if you can't get plugin to work
* @param string $auth Page authentication, unneeded in most circumstances
*/
public function GetPage($link, $cookie = 0, $post = 0, $referer = 0, $auth = 0)
{
global $pauth;
if (!$referer) {
global $Referer;
$referer = $Referer;
}
$Url = parse_url(trim($link));
$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), $referer, $cookie, $post, 0, $_GET["proxy"], $pauth, $auth);
is_page($page);
return $page;
}
开发者ID:mewtutorial,项目名称:rapidleech-ultimate,代码行数:21,代码来源:DownloadClass.php
示例15: _cookData
function _cookData($data)
{
global $db_bbsurl, $attachpath;
$data['url'] = $db_bbsurl . '/apps.php?q=photos&a=view&pid=' . $data['pid'];
$data['title'] = $data['pintro'];
if ($data['path'] && substr($rt['path'], 0, 7) != 'http://') {
$a_url = geturl($data['path']);
$data['imgurl'] = is_array($a_url) ? $a_url[0] : $a_url;
}
$data['image'] = $data['imgurl'];
return $data;
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:12,代码来源:photosource.class.php
示例16: sentMessage
function sentMessage($number, $telco, $message, $type)
{
switch ($type) {
case 2:
break;
case 1:
$baseurl = geturl($number, $telco, $message);
//callussd($baseurl,$number,$telco,$message);
break;
default:
break;
}
return true;
}
开发者ID:lfcruz,项目名称:Personal,代码行数:14,代码来源:messagesFunctions.php
示例17: getphotourl
/**
* 获取相片的真实路径
*
* @param string $path
* @param bool $thumb
* @return string
*/
function getphotourl($path, $thumb = false)
{
global $pwModeImg;
if (!$path) {
return "{$pwModeImg}/nophoto.gif";
}
$lastpos = strrpos($path, '/') + 1;
$thumb && ($path = substr($path, 0, $lastpos) . 's_' . substr($path, $lastpos));
list($path) = geturl($path, 'show');
if ($path == 'imgurl' || $path == 'nopic') {
return "{$pwModeImg}/nophoto.gif";
}
return $path;
}
开发者ID:adi00,项目名称:wumaproject,代码行数:21,代码来源:app_core.php
示例18: getphotourl
/**
* 获取照片的真实路径
*
* @param string $path
* @param bool $thumb
* @return string
*/
function getphotourl($path, $thumb = false, $defaultPic = 'nophoto.gif')
{
global $imgpath;
if (!$path) {
return "{$imgpath}/{$defaultPic}";
}
$lastpos = strrpos($path, '/') + 1;
$thumb && ($path = substr($path, 0, $lastpos) . 's_' . substr($path, $lastpos));
$path = geturl($path, 'show');
if (!is_array($path) && ($path == 'imgurl' || $path == 'nopic')) {
return "{$imgpath}/{$defaultPic}";
}
return $path[0];
}
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:21,代码来源:core.php
示例19: getUploadUrl
function getUploadUrl()
{
try {
$page = geturl("api.wupload.com", 80, '/upload?method=getUploadUrl&format=json&u=' . $this->_username . '&p=' . $this->_password, 0, 0, 0, 0, $_GET["proxy"], $pauth);
$response = explode("\n", $page);
$body = '';
foreach ($response as $content) {
$content = trim($content);
if (isset($isBody) && $isBody <= 1) {
$isBody++;
}
if ($content == '') {
$isBody = 0;
}
if ($content == '0') {
break;
}
if ($isBody == 2) {
$body = $content;
}
}
$apiResponse = json_decode($body, true);
if (!$apiResponse || !isset($apiResponse['FSApi_Upload']) || !isset($apiResponse['FSApi_Upload']['getUploadUrl']) || !isset($apiResponse['FSApi_Upload']['getUploadUrl']['status'])) {
throw new Exception("Unable to get upload server, unknow API response. Debugging: " . $page);
}
if ($apiResponse['FSApi_Upload']['getUploadUrl']['status'] == 'failed') {
$msg = '';
foreach ($apiResponse['FSApi_Upload']['getUploadUrl']['errors'] as $type => $errors) {
switch ($type) {
case 'FSApi_Auth_Exception':
$msg .= "Please verify your Username and Password\n";
break;
default:
$msg .= $errors . "\n";
}
}
throw new Exception("Failed to get upload server with message: " . $msg);
}
$this->_uploadUrl = $apiResponse['FSApi_Upload']['getUploadUrl']['response']['url'];
$this->_uploadMaxFilesize = $apiResponse['FSApi_Upload']['getUploadUrl']['response']['url'];
return $this->_uploadUrl;
} catch (Exception $e) {
echo '<pre>' . $e->getMessage() . '</pre>';
exit;
}
}
开发者ID:laiello,项目名称:rapidleech36b,代码行数:46,代码来源:wupload.com_member.php
示例20: _cookData
/**
*
* 数据处理
* @param array $data
* @return array
*/
function _cookData($data)
{
foreach ($data as $k => $v) {
$v['url'] = 'read.php?tid=' . $v['tid'];
$v['title'] = $v['subject'];
$v['value'] = $v['postdate'];
$temp = geturl($v['icon']);
$v['image'] = $temp[0] ? $temp[0] : '';
$v['authorurl'] = 'u.php?uid=' . $v['authorid'];
$v['forumname'] = getForumName($v['fid']);
$v['forumurl'] = getForumUrl($v['fid']);
list($v['topictypename'], $v['topictypeurl']) = getTopicType($v['type'], $v['fid']);
$v['addition'] = $v;
$data[$k] = $v;
}
return $data;
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:23,代码来源:tradesource.class.php
注:本文中的geturl函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论