浏览代码

优化https采集

dev
xushulang GitHub 5 年前
父节点
当前提交
0031252d48
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. +3
    -3
      Src/包括/dedehtml2.class.php

src/include/dedehtml2.class.php → Src/包括/dedehtml2.class.php 查看文件

@@ -48,7 +48,7 @@ class DedeHtml2
$this->Links = Array(); $this->Links = Array();
$this->BaseUrl = ''; $this->BaseUrl = '';
$this->BaseUrlPath = ''; $this->BaseUrlPath = '';
$this->Scheme = 'http://';
$this->Scheme = 'http://';
$this->HomeUrl = ''; $this->HomeUrl = '';
$this->IsHead = false; $this->IsHead = false;
$this->ImgHeight = 30; $this->ImgHeight = 30;
@@ -79,7 +79,7 @@ class DedeHtml2
$this->BaseUrl = $url; $this->BaseUrl = $url;
//判断文档相对于当前的路径 //判断文档相对于当前的路径
$urls = @parse_url($url); $urls = @parse_url($url);
$this->Scheme = $urls['scheme'] . '://';
$this->Scheme = $urls['scheme'] . '://';
$this->HomeUrl = $urls['host']; $this->HomeUrl = $urls['host'];
$this->BaseUrlPath = $this->HomeUrl.$urls['path']; $this->BaseUrlPath = $this->HomeUrl.$urls['path'];
$this->BaseUrlPath = preg_replace("/\/([^\/]*)\.(.*)$/","/",$this->BaseUrlPath); $this->BaseUrlPath = preg_replace("/\/([^\/]*)\.(.*)$/","/",$this->BaseUrlPath);
@@ -402,7 +402,7 @@ class DedeHtml2
{ {
$okurl = preg_replace('/^http:\/\//i', '', $surl); $okurl = preg_replace('/^http:\/\//i', '', $surl);
} }
else if( strtolower(substr($surl,0,8))=='https://' )
else if( strtolower(substr($surl,0,8))=='https://' )
{ {
$okurl = preg_replace('/^https:\/\//i', '', $surl); $okurl = preg_replace('/^https:\/\//i', '', $surl);
} }

正在加载...
取消
保存