当前位置: 首页>>代码示例>>PHP>>正文


PHP geturl函数代码示例

本文整理汇总了PHP中geturl函数的典型用法代码示例。如果您正苦于以下问题:PHP geturl函数的具体用法?PHP geturl怎么用?PHP geturl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了geturl函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 .= "&bull; {$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


注:本文中的geturl函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。