• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getRealUrl函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了getRealUrl函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: parseItems

    function parseItems()
    {
        $items = array();
        $pattern = '{<img src="(images/[^\\"]+.jpg)"  border="0" alt="([^\\"]*)">
</a> <br> <br> <a [^>]+> <img [^>]+> </a> <br> <br> </td> <td [^>]+>
<span class=articul> <u> <a name="[^\\"]+">([^<]+)</a> </u>
<br> <a href="(cat/[^\\"]+.html)">([^<]+)</a> (</font>)* </span>
<span class=gray_small_text>(.*?)</span>}s';
        $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
        if (!preg_match_all($pattern, $this->pageContent, $matches_m, PREG_SET_ORDER)) {
            return new PEAR_Error("Ошибка при выделении элементов.");
        }
        foreach ($matches_m as $matches) {
            $largeImg = preg_replace("{^(.*)\\.jpg\$}", "\$1b.jpg", $matches[1]);
            $comments = trim(strip_tags(str_replace("<br>", "\n", $matches[7])));
            $props = explode("\n", $comments);
            if (!isset($props[5])) {
                $size = "";
                $material = "";
                $drawing = "";
            } else {
                $size = isset($props[0]) ? $props[0] : "";
                $material = isset($props[1]) ? $props[1] : "";
                $drawing = isset($props[5]) ? $props[5] : "";
            }
            $url = getRealUrl($this->url, $matches[4]);
            $items[] = array("art" => $matches[3], "name" => $matches[5], "size" => $size, "material" => $material, "drawing" => $drawing, "descr" => $matches[2], "descr_other" => $comments, "url" => $url, "image_small" => $this->getSiteUrl() . $matches[1], "image_large" => $this->getSiteUrl() . $largeImg);
        }
        return $items;
    }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:30,代码来源:EkofinplastContentGrabber.php


示例2: parseItems

 function parseItems()
 {
     $items = array();
     $pattern = '{<div id="text">
       <h1>(.+?)</h1>
       <p>(.+?)</p>}s';
     $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
     if (!preg_match($pattern, $this->pageContent, $matches)) {
         return new PEAR_Error("Items not found.");
     }
     $name = strip_tags($matches[1]);
     $descr = strip_tags($matches[2]);
     $pattern = '{<img border="0" src="((images/[^"]+_)small(_[^"]+))"}s';
     if (!preg_match($pattern, $this->pageContent, $matches)) {
         $imgSmall = "";
         $img = "";
     } else {
         $imgSmall = getRealUrl(basePath($this->url), $matches[1]);
         $img = getRealUrl(basePath($this->url), $matches[2] . "big" . $matches[3]);
     }
     $pattern = '{<td><p class="pnavbar2"><b>(.+?)</b></p></td>}s';
     if (!preg_match_all($pattern, $this->pageContent, $matches, PREG_PATTERN_ORDER)) {
         $colors = "";
     } else {
         $colors = implode(", ", $matches[1]);
     }
     $items[] = array("image_large" => $img, "image_small" => $imgSmall, "url" => $this->url, "name" => $name, "descr" => $descr, "colors" => $colors);
     return $items;
 }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:29,代码来源:EliteLineContentGrabber.php


示例3: parseItems

    function parseItems()
    {
        $items = array();
        $pattern = <<<PATTERN
{openWin\\('(/images/material-thumb/.+?)'.+?<img src="(/images/material-thumb/.+?)".+?
class="ProdName" [^>]+>(.+?)</a>}s
PATTERN;
        $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
        if (!preg_match_all($pattern, $this->pageContent, $matches, PREG_SET_ORDER)) {
            return new PEAR_Error("Ошибка при выделении элементов.");
        }
        foreach ($matches as $m) {
            $url = $this->url;
            $img = getRealUrl(basePath($this->url), $m[1]);
            $imgSmall = getRealUrl(basePath($this->url), $m[2]);
            if (preg_match('{".+"}s', $m[3], $matches) || strpos($m[3], "-") === false) {
                $name = $m[3];
                $art = "";
            } else {
                if (preg_match('{(.*?) ([^0-9]+)}s', $m[3], $mArtName)) {
                    $art = $mArtName[1];
                    $name = $mArtName[2];
                } else {
                    $art = $m[3];
                    $name = "";
                }
            }
            $items[] = array("url" => $url, "image_large" => $img, "image_small" => $imgSmall, "art" => $art, "name" => $name);
        }
        return $items;
    }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:31,代码来源:SaluteclockContentGrabber.php


示例4: parseItems

    function parseItems()
    {
        $items = array();
        $pattern = <<<PATTERN
{<TABLE[^>]+>
<TR[^>]+>
<TD[^>]+> <IMG src="(resize.php\\?name=[^"]+)".+?
onclick="javascript:window\\.open\\('catalogPrev.php\\?catalogId=(\\d+)'[^"]+\\);"> </TD>
<TD[^>]+>
<h3>(.+?)</h3>
(.+?)<TABLE
}si
PATTERN;
        $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
        if (!preg_match_all($pattern, $this->pageContent, $matches, PREG_SET_ORDER)) {
            return new PEAR_Error("Items not found.");
        }
        foreach ($matches as $m) {
            $imgSmall = getRealUrl(basePath($this->url), $m[1]);
            $img = getRealUrl(basePath($this->url), "ItemImages/" . $m[2] . ".jpg");
            $art = trim($m[3]);
            $descr = trim(html_entity_decode(strip_tags($m[4])));
            $pattern = "{Размеры\\s*\\(XxYxZ\\):(.+)}s";
            if (preg_match($pattern, $descr, $mSize)) {
                $size = trim($mSize[1]);
            } else {
                $size = "";
            }
            $items[] = array("url" => $this->url, "image_large" => $img, "image_small" => $imgSmall, "descr" => $descr, "size" => $size, "art" => $art);
        }
        return $items;
    }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:32,代码来源:ElisirContentGrabber.php


示例5: parseItems

    function parseItems()
    {
        $items = array();
        $pattern = '{<img src="(/photo/.+?)".+?
<b>(.+?)</b> : (.+?)</b>.+?Цена : (.+?) у.е. <br> <br>
(.+?) <br> <br> <b> Материал: </b>(.+?)<br>
<b> Цвета корпуса: </b>(.+?)<br> <b> Цвета деталей: (.*?)</b> <br>}s';
        $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
        if (!preg_match_all($pattern, $this->pageContent, $matches, PREG_SET_ORDER)) {
            return new PEAR_Error("Ошибка при выделении элементов.");
        }
        foreach ($matches as $m) {
            $item = array();
            $item["image_large"] = getRealUrl(basePath($this->url), $m[1]);
            $item["art"] = strip_tags($m[2]);
            $item["name"] = $m[3];
            $item["price"] = strip_tags($m[4]);
            $item["descr"] = strip_tags($m[5]);
            $item["material"] = $m[6];
            $item["colors"] = $m[7];
            $item["url"] = $this->url;
            $items[] = $item;
        }
        return $items;
    }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:25,代码来源:SenatorPenContentGrabber.php


示例6: parseItems

    function parseItems()
    {
        $items = array();
        $pattern = <<<PATTERN
{<tr>
<td align="center"> <h2 class="context">(.+?)</h2> </td>
<td align="center"> <span class="context">(.+?)</span> </td>
<td align="center"> <span class="context">(.+?)</span> </td>
<td align="center"> <a.+?href="(prod/zapis/[^"]+)" target="_blank">
<img.+?src="(prod/zapis/[^"]+)".+?> </a> </td>}s
PATTERN;
        $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
        if (!preg_match_all($pattern, $this->pageContent, $matches, PREG_SET_ORDER)) {
            return new PEAR_Error("Items not found.");
        }
        foreach ($matches as $m) {
            $name = trim($m[1]);
            $art = trim($m[2]);
            $size = trim($m[3]);
            $img = getRealUrl(basePath($this->url), $m[4]);
            $imgSmall = getRealUrl(basePath($this->url), $m[5]);
            $items[] = array("url" => $this->url, "image_large" => $img, "image_small" => $imgSmall, "name" => $name, "art" => $art, "size" => $size);
        }
        return $items;
    }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:25,代码来源:MezaContentGrabber.php


示例7: parseItems

    function parseItems()
    {
        $items = array();
        $pattern = <<<PATTERN
{<img src='((images/catalogue/[^']+?)_s(\\.jpg))'.+?
\t\t\t<a href='(/\\?action=OnShowGood\\&ID=(.+?))'>
\t\t\t\t<b>(.+?)(\\(склад\\))*</b></a>}s
PATTERN;
        $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
        if (!preg_match_all($pattern, $this->pageContent, $matches, PREG_SET_ORDER)) {
            return new PEAR_Error("Ошибка при выделении элементов.");
        }
        foreach ($matches as $m) {
            $item = array();
            $item["image_small"] = getRealUrl(basePath($this->url), $m[1]);
            $item["image_large"] = getRealUrl(basePath($this->url), $m[2] . "_b" . $m[3]);
            $item["url"] = getRealUrl(basePath($this->url), $m[4]);
            $name = trim($m[6]);
            $art = "";
            $p = strrpos($name, " ");
            if ($p !== false && $p > 0) {
                $art = substr($name, $p + 1);
                $name = substr($name, 0, $p);
            }
            $item["name"] = $name;
            $item["art"] = $art;
            $items[] = $item;
        }
        return $items;
    }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:30,代码来源:ChasartContentGrabber.php


示例8: addPageUrls

 /**
  * Добавление урлов на страницы с данными в список
  */
 function addPageUrls($urls)
 {
     if (sizeof($urls) <= 0) {
         return;
     }
     foreach ($urls as $url) {
         $url = getRealUrl(basePath($this->url), $url);
         if (!in_array($url, $this->pagesUrls)) {
             $this->pagesUrls[] = $url;
         }
     }
 }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:15,代码来源:IContentGrabber.php


示例9: parseItems

    function parseItems()
    {
        $items = array();
        $pattern = '{<div style=".+?" id="row_.+?">
<table width="100%" cellspacing="0" cellpadding="0" border="0" >(.+?)
</div><br style="clear:both;" />}s';
        $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
        if (!preg_match_all($pattern, $this->pageContent, $matches, PREG_PATTERN_ORDER)) {
            return new PEAR_Error("Items not found.");
        }
        foreach ($matches[0] as $m) {
            // Pattern 1
            $pattern = '{<a href="javascript.+?
<img src="(http://www.luxor-russia.com/components/com_phpshop/show_image_in_imgtag\\.php\\?[^"]+)".+?
<a[^>]+href="(http://luxor-russia.com/index\\.php\\?page=[^"]+)">(.+?)</a>.+?<td colspan="2">(.+?)</td>}s';
            $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
            if (preg_match($pattern, $m, $data)) {
                $imgSmall = getRealUrl($this->url, $data[1]);
                $url = getRealUrl($this->url, $data[2]);
                $name = trim($data[3]);
                $descr = strip_tags($data[4]);
            } else {
                // Pattern 2
                $pattern = '{href="(http://luxor-russia.com/index\\.php\\?page=[^"]+)">(.+?)</a>.+?
<img src="(http://www\\.luxor-russia\\.com/components/com_phpshop/show_image_in_imgtag\\.php\\?[^"]+)".+?
<td[^>]+>(.+?)<a}s';
                $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
                if (preg_match($pattern, $m, $data)) {
                    $url = getRealUrl($this->url, $data[1]);
                    $name = trim($data[2]);
                    $imgSmall = getRealUrl($this->url, $data[3]);
                    $descr = strip_tags($data[4]);
                }
            }
            if (!preg_match('{(.+?)÷вет:\\s*(.+)}s', $descr, $mSrc)) {
                $colors = "";
                $descr = trim($descr);
            } else {
                $descr = trim($mSrc[1]);
                $colors = trim($mSrc[2]);
            }
            $item = $this->getItemInfo($url);
            $item["name"] = $name;
            $item["image_small"] = $imgSmall;
            $item["descr"] = $descr;
            $item["colors"] = $colors;
            $item["url"] = $url;
            $items[] = $item;
        }
        return $items;
    }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:51,代码来源:BrainLuxorContentGrabber.php


示例10: parseItems

    function parseItems()
    {
        $items = array();
        $pattern = <<<PATTERN
{<tr>
<td[^>]+>(\\d+)</td>
<td[^>]+> <p align="justify">(.+?)</p> </td>
<td[^>]+>(.+?)</td>
<td[^>]+>
(<table[^>]+>(.+?)</table>)*
</td>
<td[^>]+>
(<a href="#" onClick="window.open\\('([^']+)','','[^']+'\\); return false;">
<img src="(pic_small/[^"]+)" width="100"[^>]+> </a>|.+?)
</td>
</tr>
}s
PATTERN;
        //"
        $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
        if (!preg_match_all($pattern, $this->pageContent, $matches, PREG_SET_ORDER)) {
            return new PEAR_Error("Items not found.");
        }
        foreach ($matches as $m) {
            $descr = trim(strip_tags($m[2]));
            $art = trim($m[3]);
            if (isset($m[7])) {
                $img = getRealUrl(basePath($this->url), $m[7]);
            } else {
                $img = "";
            }
            if (isset($m[8])) {
                $imgSmall = getRealUrl(basePath($this->url), $m[8]);
            } else {
                $imgSmall = "";
            }
            $pattern = "{Размеры\\s*\\(XxYxZ\\):(.+)}s";
            if (preg_match($pattern, $descr, $mSize)) {
                $size = trim($mSize[1]);
            } else {
                $size = "";
            }
            $items[] = array("url" => $this->url, "image_large" => $img, "image_small" => $imgSmall, "descr" => $descr, "size" => $size, "art" => $art);
        }
        return $items;
    }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:46,代码来源:ArhangContentGrabber.php


示例11: parseItems

 function parseItems()
 {
     $items = array();
     $img = "";
     $pattern = '{src="([^"]+ru/modules/catalog/admin/goods_images/[^"]+)"}si';
     if (preg_match($pattern, $this->pageContent, $matches)) {
         $img = getRealUrl(basePath($this->url), $matches[1]);
         $img = str_replace(" ", "%20", $img);
     }
     $name = "";
     $pattern = '{<td[^>]+background="images/portcapback.gif"[^>]+class=portcap>(.+?)</td>}si';
     if (preg_match($pattern, $this->pageContent, $matches)) {
         $name = trim(strip_tags($matches[1]));
     }
     $items[] = array("image_small" => $img, "image_large" => $img, "url" => $this->url, "name" => $name);
     return $items;
 }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:17,代码来源:LeogetsContentGrabber.php


示例12: parseItems

 function parseItems()
 {
     $items = array();
     $this->pageContent = iconv($this->getSiteEncoding(), "windows-1251", $this->pageContent);
     $pattern = "{<a href='/show_img\\.php\\?p\\[0\\]=(.+?)\\&.+?'\n\t\t\tonClick='return pop_window.+?><img src='(/zont/pics/.+?)' border=1>\n</a><br>(.+?)<br>(.+?)</td>}s";
     $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
     if (!preg_match_all($pattern, $this->pageContent, $matches, PREG_SET_ORDER)) {
         return new PEAR_Error("Ошибка при выделении элементов.");
     }
     foreach ($matches as $m) {
         $img = getRealUrl(basePath($this->url), "/zont/pics/" . $m[1]);
         $imgSmall = getRealUrl(basePath($this->url), $m[2]);
         $art = $m[3];
         $descr = $m[4];
         $items[] = array("url" => $this->url, "image_large" => $img, "image_small" => $imgSmall, "art" => $art, "descr" => $descr);
     }
     return $items;
 }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:18,代码来源:UmbrellasContentGrabber.php


示例13: parseItems

 function parseItems()
 {
     $items = array();
     $pattern = "{<a target=_blank\n\t\t\thref='(/card.php\\?id=[^']+)'>\n\t\t\t<img border=0 src='(\\./files/images/[^']+)'}s";
     $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
     if (!preg_match_all($pattern, $this->pageContent, $matches, PREG_PATTERN_ORDER)) {
         return new PEAR_Error("Ошибка при выделении элементов.");
     }
     $urls = $matches[1];
     $smallImages = $matches[2];
     for ($i = 0; $i < sizeof($urls); $i++) {
         $url = getRealUrl(basePath($this->url), $urls[$i]);
         $item = $this->getItemInfo($url);
         $item["image_small"] = getRealUrl(basePath($this->url), $smallImages[$i]);
         $items[] = $item;
     }
     return $items;
 }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:18,代码来源:MondContentGrabber.php


示例14: parseItems

 function parseItems()
 {
     $items = array();
     $pattern = '{<div><a href="(zoom\\.php\\?cat=.+?)"><img src="(catimages/[^"]+)"}s';
     $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
     if (!preg_match_all($pattern, $this->pageContent, $matches, PREG_PATTERN_ORDER)) {
         return new PEAR_Error("Ошибка при выделении элементов.");
     }
     $urls = $matches[1];
     $smallImages = $matches[2];
     for ($i = 0; $i < sizeof($urls); $i++) {
         $url = getRealUrl(basePath($this->url), $urls[$i]);
         $item = $this->getItemInfo($url);
         $item["image_small"] = getRealUrl(basePath($this->url), $smallImages[$i]);
         $items[] = $item;
     }
     return $items;
 }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:18,代码来源:SimvolikaContentGrabber.php


示例15: parseItems

    function parseItems()
    {
        $items = array();
        $pattern = '{
<a href="(/index\\.php\\?page=\\d+)"> <img src="(/file\\.php\\?f=\\d+)"}s';
        $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
        if (!preg_match_all($pattern, $this->pageContent, $matches, PREG_PATTERN_ORDER)) {
            return new PEAR_Error("Items not found.");
        }
        $urls = $matches[1];
        $smallImages = $matches[2];
        for ($i = 0; $i < sizeof($urls); $i++) {
            $url = getRealUrl(basePath($this->url), $urls[$i]);
            $item = $this->getItemInfo($url);
            $item["image_small"] = getRealUrl(basePath($this->url), $smallImages[$i]);
            $items[] = $item;
        }
        return $items;
    }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:19,代码来源:ElitebookContentGrabber.php


示例16: parseItems

    function parseItems()
    {
        $items = array();
        $pattern = '{
<td[^>]*>
<img[^>]+src="(/pic/[^"]+)"[^>]*>
</td>
}s';
        $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
        if (!preg_match_all($pattern, $this->pageContent, $matches, PREG_SET_ORDER)) {
            return new PEAR_Error("Items not found.");
        }
        foreach ($matches as $m) {
            $img = getRealUrl(basePath($this->url), $m[1]);
            $item = array("url" => $this->url, "image_large" => $img);
            $items[] = $item;
        }
        return $items;
    }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:19,代码来源:VashlogotipContentGrabber.php


示例17: parseItems

    function parseItems()
    {
        $items = array();
        $pattern = <<<PATTERN
{<a href="(.+?)"
\t\t\tonClick="big_win\\('nw7',880,490\\);" target="nw7">
\t\t\t<img src="(img/.+?)"}s
PATTERN;
        $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
        if (!preg_match_all($pattern, $this->pageContent, $matches, PREG_SET_ORDER)) {
            return new PEAR_Error("Ошибка при выделении элементов.");
        }
        foreach ($matches as $m) {
            $url = getRealUrl(basePath($this->url), $m[1]);
            $item = $this->getItemInfo($url);
            $item["image_small"] = getRealUrl(basePath($this->url), $m[2]);
            $items[] = $item;
        }
        return $items;
    }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:20,代码来源:SotekRavContentGrabber.php


示例18: parseItems

    function parseItems()
    {
        $items = array();
        $pattern = <<<PATTERN
{<td width="22%"><img src="([^"]+?)"
\twidth=".+?" height=".+?" alt="(.+?)"></td>}s
PATTERN;
        $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
        if (!preg_match_all($pattern, $this->pageContent, $matches, PREG_SET_ORDER)) {
            return new PEAR_Error("Items not found.");
        }
        foreach ($matches as $m) {
            $item = array();
            $item["image_large"] = getRealUrl(basePath($this->url), $m[1]);
            $item["name"] = $m[2];
            $item["url"] = $this->url;
            $items[] = $item;
        }
        return $items;
    }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:20,代码来源:ProdvizenieContentGrabber.php


示例19: parseItems

 function parseItems()
 {
     $items = array();
     $pattern = "{<a href='javascript:launchImg\\(\"(.+?)\",(\\d+)\\).+?\n\t\t\tsrc='(catalog/.+?)'.+?<b>(.+?)</b>.+?\n\t\t\t<b>јртикул:</b>(.+?)</td>.+?\n\t\t\t<b>Ѕренд:</b>(.+?)</td>.+?\n\t\t\t<b>÷ена:</b>(.+?)</td>}s";
     $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
     if (!preg_match_all($pattern, $this->pageContent, $matches, PREG_SET_ORDER)) {
         return new PEAR_Error("Items not found.");
     }
     foreach ($matches as $m) {
         $art = trim($m[5]);
         $imgSmall = getRealUrl(basePath($this->url), $m[3]);
         $img = "catalog/" . $m[2] . "/big/" . $m[1] . ".jpg";
         $img = getRealUrl(basePath($this->url), $img);
         $name = trim($m[4]);
         $brandname = trim($m[6]);
         $price = trim($m[7]);
         $items[] = array("art" => $art, "image_large" => $img, "image_small" => $imgSmall, "url" => $this->url, "name" => $name, "brandname" => $brandname, "price" => $price);
     }
     return $items;
 }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:20,代码来源:LeondirectContentGrabber.php


示例20: parseItems

    function parseItems()
    {
        $items = array();
        $pattern = <<<PATTERN
{<td valign='top' width='50%'><a href='(.+?.html)' target='_blank'>
\t <img src='(images/.+?)' border='0' align='left' hspace='7' vspace='6'>
<font class='maintext'>Артикул:}s
PATTERN;
        $pattern = preg_replace("{\\s+}", "\\s*", $pattern);
        if (!preg_match_all($pattern, $this->pageContent, $matches, PREG_PATTERN_ORDER)) {
            return new PEAR_Error("Items not found.");
        }
        $urls = $matches[1];
        $smallImages = $matches[2];
        for ($i = 0; $i < sizeof($urls); $i++) {
            $url = getRealUrl(basePath($this->url), $urls[$i]);
            $item = $this->getItemInfo($url);
            $item["image_small"] = getRealUrl(basePath($this->url), $smallImages[$i]);
            $items[] = $item;
        }
        return $items;
    }
开发者ID:rivetweb,项目名称:old-auto-catalog,代码行数:22,代码来源:OgramContentGrabber.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getRecInsuranceData函数代码示例发布时间:2022-05-15
下一篇:
PHP getRealPath函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap