本文整理匯總了PHP中PMF_Utils::getHTTPContent方法的典型用法代碼示例。如果您正苦於以下問題:PHP PMF_Utils::getHTTPContent方法的具體用法?PHP PMF_Utils::getHTTPContent怎麽用?PHP PMF_Utils::getHTTPContent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PMF_Utils
的用法示例。
在下文中一共展示了PMF_Utils::getHTTPContent方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: header
if (isset($matches['artlang'])) {
$artlang = $matches['artlang'];
}
// Sanity check
if (is_null($cat) || is_null($id) || is_null($artlang)) {
header('HTTP/1.1 403 Forbidden');
print 'Invalid FAQ link.';
exit;
}
// Load categories
$category = new PMF_Category();
// Load the required faq
$faq = new PMF_Faq();
$faq->getRecord($id);
// Get the HTML content
$html = @PMF_Utils::getHTTPContent($link);
// Try to attach the PDF content
$pdfFile = $faq->buildPDFFile($cat);
foreach ($mailto['mailto'] as $recipient) {
$recipient = trim(strip_tags($recipient));
if (!empty($recipient)) {
$mail = new PMF_Mail();
$mail->unsetFrom();
$mail->setFrom($mailfrom, $name);
$mail->addTo($recipient);
$mail->subject = $PMF_LANG["msgS2FMailSubject"] . $name;
$mail->message = $faqconfig->get("main.send2friendText") . "\r\n\r\n" . $PMF_LANG["msgS2FText2"] . "\r\n" . $link . "\r\n\r\n" . $attached;
if ($html !== false) {
$mail->messageAlt = $faqconfig->get("main.send2friendText") . "\r\n\r\n" . $PMF_LANG["msgS2FText2"] . "\r\n" . $link . "\r\n\r\n" . $attached;
$mail->setHTMLMessage($html);
}