本文整理汇总了PHP中WebPage::openLink方法的典型用法代码示例。如果您正苦于以下问题:PHP WebPage::openLink方法的具体用法?PHP WebPage::openLink怎么用?PHP WebPage::openLink使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebPage
的用法示例。
在下文中一共展示了WebPage::openLink方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: WebPage
$relDir = eregi_replace("/[^/]*\$", "/", $relDir);
/************************************************\
* We create a new object of type WebPage and *
* pass it the url we are being a proxy for and *
* other information about the current state. *
\************************************************/
$page = new WebPage($redirectIP . $_GET[$fileVar], true, $server, "URLproxyServer.php", $fileVar, $relDir);
/************************************************\
* This tells the WebPage object to open up a *
* connection to the URL. *
* *
* Note: *
* This does not actually get the web page, just *
* opens the connection for the headers. *
\************************************************/
$page->openLink();
/************************************************\
* Process the headers so we know what kind of *
* data we have (html/other) *
\************************************************/
$head = processHeaders($page->getHeaders(), $file, $mime_dl, $type, $isDown, $isHtml, $isImage);
/************************************************\
* This code replicates the headers that were *
* sent when the class connected to the url. *
* *
* FIXME: extra headers need to be sent if we are *
* downloading the file. *
* *
* GOTCHA?: need to check if http 1.1 will work *
* correctly *
\************************************************/