本文整理汇总了PHP中getBody函数的典型用法代码示例。如果您正苦于以下问题:PHP getBody函数的具体用法?PHP getBody怎么用?PHP getBody使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getBody函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: editall
function editall()
{
global $db;
$t_id = be("arr", "ids");
$ids = explode(",", $t_id);
foreach ($ids as $id) {
$t_flag = be("post", "t_flag" . $id);
$t_sort = be("post", "disp_order" . $id);
if (isN($t_sort)) {
$t_sort = $db->getOne("SELECT MAX(disp_order) FROM {pre}vod_topic_items") + 1;
}
if (!isNum($t_sort)) {
echo "信息填写不完整!";
exit;
}
$db->Update("{pre}vod_topic_items", array("flag", "disp_order"), array($t_flag, $t_sort), "id=" . $id);
}
updateCacheFile();
$topic_id = getBody(getReferer(), 'topic_id=', '&');
if (isN($topic_id)) {
$topic_id = getBodys(getReferer(), 'topic_id=');
}
if (!isN($topic_id)) {
replaceTopRecommend($topic_id);
}
echo "修改完毕";
}
示例2: parseMovieInfoByContent
static function parseMovieInfoByContent($content, $p_code, $type)
{
$content = getBody($content, TVSouLiveParse::contentparmStart, TVSouLiveParse::contentparaend);
// var_dump($content);color='#CC9966'
$content = replaceStr($content, '#CC9966', '#6699CC');
$times = getArray($content, "<font color='#6699CC'>", "</font>");
$names = getArray($content, "<div id='e2' >", "</div>");
// var_dump($names);
// $names=filterScript($names,8191);
$timesArray = explode("{Array}", $times);
$namesArray = explode("{Array}", $names);
// var_dump($timesArray);
$prod_itmes = array();
$index = 0;
foreach ($timesArray as $timeItem) {
$name = $namesArray[$index];
$nameArray = explode('<ahref=', $name);
if (!isN($nameArray[0])) {
$itemName = $nameArray[0];
} else {
$itemName = filterScript($name, 8191);
}
$prod_itmes[$timeItem] = $itemName;
$index++;
}
// var_dump($prod_itmes);
if (count($prod_itmes) == 1) {
return false;
}
return $prod_itmes;
}
示例3: parseIOSVideoUrl
public function parseIOSVideoUrl($url, $p_coding, $p_script)
{
$id = getBody($url, $this->p_videourlstart, $this->p_videourlend);
$id = base64_decode($id);
$url = replaceStr(WLContent::BASE_IOS_URL, "{ID}", $id);
$videoAddressUrl = $videoAddressUrl . MovieType::HIGH_CLEAR . MovieType::VIDEO_NAME_URL_SEP . $url;
return $videoAddressUrl;
}
示例4: getAndroidVideoUrl
private function getAndroidVideoUrl($obj, $p_coding, $p_script)
{
//var_dump($obj);
$videoAddressUrl = "";
if (!is_object($obj) || !is_object($obj->data)) {
return true;
}
/* mp4 && m3u8 */
if (property_exists($obj->data, 'mpl')) {
foreach ($obj->data->mpl as $mpl) {
/* mp4 */
switch ($mpl->vd) {
case 1:
$strBody = getPageWindow($mpl->m4u, 'utf-8');
$videoAddressUrl .= MovieType::VIDEO_SEP_VERSION . MovieType::Liu_Chang . MovieType::VIDEO_NAME_URL_SEP . getBody($strBody, 'data:{"l":"', '"');
break;
case 2:
$strBody = getPageWindow($mpl->m4u, 'utf-8');
$videoAddressUrl .= MovieType::VIDEO_SEP_VERSION . MovieType::HIGH_CLEAR . MovieType::VIDEO_NAME_URL_SEP . getBody($strBody, 'data:{"l":"', '"');
break;
}
}
/* m3u8 */
foreach ($obj->data->mpl as $mpl) {
switch ($mpl->vd) {
case 1:
$videoAddressUrl .= MovieType::VIDEO_SEP_VERSION . MovieType::Liu_Chang . MovieType::VIDEO_NAME_URL_SEP . $mpl->m3u;
break;
case 2:
$videoAddressUrl .= MovieType::VIDEO_SEP_VERSION . MovieType::HIGH_CLEAR . MovieType::VIDEO_NAME_URL_SEP . $mpl->m3u;
break;
}
}
}
/* m3u8 */
if (property_exists($obj->data, 'mtl')) {
foreach ($obj->data->mtl as $mtl) {
switch ($mtl->vd) {
case 1:
$videoAddressUrl .= MovieType::VIDEO_SEP_VERSION . MovieType::Liu_Chang . MovieType::VIDEO_NAME_URL_SEP . $mtl->m3u;
break;
case 2:
$videoAddressUrl .= MovieType::VIDEO_SEP_VERSION . MovieType::HIGH_CLEAR . MovieType::VIDEO_NAME_URL_SEP . $mtl->m3u;
break;
case 3:
$videoAddressUrl .= MovieType::VIDEO_SEP_VERSION . MovieType::TOP_CLEAR . MovieType::VIDEO_NAME_URL_SEP . $mtl->m3u;
break;
}
}
}
if (strpos($videoAddressUrl, "{mType}") !== false && strpos($videoAddressUrl, "{mType}") === 0) {
$videoAddressUrl = substr($videoAddressUrl, 7);
}
writetofile("iqiyi.log", "down url:" . $videoAddressUrl);
return $videoAddressUrl;
}
示例5: parseIOSVideoUrlByContent
public function parseIOSVideoUrlByContent($content, $p_coding, $p_script)
{
$videoUrlParam = getBody($content, $this->p_videocodeApiUrlParamstart, $this->p_videocodeApiUrlParamend);
$videoUrlParam = replaceLine($videoUrlParam);
// var_dump($videoUrlParam);
$p_videoUrlApi = replaceStr($this->p_videocodeApiUrl, "{PROD_ID}", $videoUrlParam);
$videoUrlApiCode = getPageWindow($p_videoUrlApi, $this->p_code);
$videoAddressUrl = getBody($videoUrlApiCode, $this->p_videourlstart, $this->p_videourlend);
return $videoAddressUrl;
}
示例6: parseAndroidVideoUrlByContent
public function parseAndroidVideoUrlByContent($content, $p_coding, $p_script)
{
// writetofile("content.txt", $content);
$mediaid = getBody($content, $this->contentparmStart, $this->contentparaend);
$number = getBody($content, $this->contentparmStartNum, $this->contentparaendNum);
// writetofile("daa.txt", $vid);
$vid = $mediaid . '/' . $number;
// var_dump($vid) ;
return $this->getAndroidVideoUrl($vid);
}
示例7: parseAndroidVideoUrlByContent
public function parseAndroidVideoUrlByContent($content, $p_coding, $p_script)
{
$iosurl = base64_decode(getBody($content, '["iosurl"] ' . "= '", "'"));
$iosurl = strstr($iosurl, '.', true);
$type = trim(getBody($content, "videotype='", "'"));
if ($type = 'vod' || ($type = 'video')) {
$videosrc = MovieType::HIGH_CLEAR . MovieType::VIDEO_NAME_URL_SEP . 'http://mp4i.vodfile.m1905.com/movie' . $iosurl . '.mp4';
$videosrc .= MovieType::VIDEO_SEP_VERSION . MovieType::HIGH_CLEAR . MovieType::VIDEO_NAME_URL_SEP . 'http://m3u8i.vodfile.m1905.com/movie' . $iosurl . '.m3u8';
}
return $videosrc;
}
示例8: parseAndroidVideoUrlByContent
public function parseAndroidVideoUrlByContent($content, $p_coding, $p_script)
{
//writetofile("content.txt", $content);
$vid = getBody($content, $this->contentparmStart, $this->contentparaend);
// writetofile("daa.txt", $vid);
// var_dump($vid) ;
if ($vid === false || $vid === '') {
return '';
}
return $this->getAndroidVideoUrl($vid);
}
示例9: getActivityHtml
function getActivityHtml($activity, $translation)
{
$result = "";
$result .= getHeader($translation);
$result .= "<tbody>";
foreach ($activity as $admin) {
$result .= getBody($admin);
}
$result .= "</tbody>";
$result .= "</table>";
return $result;
}
示例10: getActivityHtml
function getActivityHtml($kills, $translation)
{
$result = "";
$result .= getHeader($translation);
$result .= "<tbody>";
$poradie = 0;
foreach ($kills as $kill) {
$poradie += 1;
$result .= getBody($kill, $poradie);
}
$result .= "</tbody>";
$result .= "</table>";
return $result;
}
示例11: getAndroidVideoUrl
private function getAndroidVideoUrl($vid)
{
$videoAddressUrl = "";
if (isset($vid) && !is_null($vid)) {
$url = replaceStr(SohuContent::BASE_URL, "{id}", $vid);
$location = getPage($url, "utf-8");
$location = getBody($location, $this->contentparmStart2, $this->contentparaend2);
var_dump($location);
if (!isN($location)) {
$videoAddressUrl = $videoAddressUrl . MovieType::HIGH_CLEAR . MovieType::VIDEO_NAME_URL_SEP . $location;
}
}
return $videoAddressUrl;
}
示例12: parseMovieInfoByContent
static function parseMovieInfoByContent($content, $p_code, $type)
{
$content = getBody($content, CnTVLiveParse::contentparmStart, CnTVLiveParse::contentparaend);
$items = getArray($content, "<dd>", "</dd>");
$itemArray = explode("{Array}", $items);
$prod_itmes = array();
foreach ($itemArray as $item) {
$item = filterScript($item, 8191);
$item = trim($item);
$item = replaceStr($item, '回看', '');
$date = substr($item, 0, 5);
$item = replaceStr($item, $date, '');
$prod_itmes[$date] = $item;
}
if (count($prod_itmes) == 1) {
return false;
}
return $prod_itmes;
}
示例13: replaceFilters
function replaceFilters($strContent, $pid, $sobject, $f_sys)
{
//$f_sys=0视频, $flag=1文章
global $db;
$sql = "select * from {pre}cj_filters where f_flag=1 and f_sys=" . $f_sys . " and (f_pid=0 or f_pid='" . $pid . "') and (f_object=0 or f_object='" . $sobject . "')";
$rs = $db->query($sql);
if ($rs) {
while ($row = $db->fetch_array($rs)) {
if ($row["f_type"] == 1) {
$strContent = replaceStr($strContent, $row["f_content"], $row["f_rep"]);
} else {
$FilterStr = getBody($strContent, $row["f_strstart"], $row["f_strend"]);
if ($FilterStr != false) {
$strContent = replaceStr($strContent, $row["f_strstart"], "");
$strContent = replaceStr($strContent, $row["f_strend"], "");
$strContent = replaceStr($strContent, $FilterStr, $row["f_rep"]);
}
}
}
}
unset($rs);
return $strContent;
}
示例14: count
$pdf->setFontSize(13);
$pdf->WriteHTMLCell(0, 5, 95, $y + 33, '<div style="text-transform:uppercase">' . $sequence['LIBELLEHTML'] . "</div>");
$pdf->setFontSize(8);
# Table header
$nbMatieres = count($groupe1) + count($groupe2) + count($groupe3);
$line_height = "11px";
if ($nbMatieres >= 14) {
$line_height = "9px";
}
$corps = '<table border="0.5" cellpadding="0.5" style="line-height: ' . $line_height . '"><thead>' . '<tr style="text-align:center;font-weight:bold; line-height: 15px;background-color:#444444;color:#FFF;">' . '<th border="0.5" width="' . $col[1] . '%" style="text-align:left"> Matières</th>' . '<th border="0.5" width="' . $col[2] . '%">DP</th>' . '<th border="0.5" width="' . $col[3] . '%">DH</th><th border="0.5" width="' . $col[4] . '%">Moy</th>' . '<th border="0.5" width="' . $col[5] . '%">Coef</th><th border="0.5" width="' . $col[6] . '%">Total</th>' . '<th border="0.5" width="' . $col[7] . '%">Rang</th>' . '<th border="0.5" width="' . $col[8] . '%">Moy.Cl</th>' . '<th border="0.5" width="' . $col[9] . '%">Min/Max</th>' . '<th border="0.5" width="' . $col[10] . '%">Appréciation</th></tr></thead><tbody>';
# FAIRE UNE BOUCLE SUR LES GROUPES DE MATIERES
$st1 = $sc1 = $st2 = $sc2 = 0;
$corps .= getBody($groupe1, $col, $eleve, $st1, $sc1);
$corps .= getBody($groupe2, $col, $eleve, $st2, $sc2);
$corps .= printGroupe($st1 + $st2, $sc1 + $sc2, $col, "Groupe 1 + Groupe 2");
$corps .= getBody($groupe3, $col, $eleve);
$corps .= "</tbody></table>";
$pdf->WriteHTMLCell(0, 5, 14, $y + 40, $corps);
# RESUME DU TRAVAIL ACCOMPLI
$pdf->setFontSize(7);
$corps = printTravail($rang, $travail, $eleve, $prev);
$pdf->WriteHTMLCell(0, 5, 25, $y + 173, $corps);
# Discripline
$corps = printDiscipline($discipline);
$pdf->WriteHTMLCell(0, 0, 25, $y + 188, $corps);
$pdf->setFont("helvetica", '', 8);
# Desinner la coube d'evolution
$moyennes = getMoyennesRecapitulatives($recapitulatifs, $eleve['IDELEVE']);
$moyennes[] = $rang['MOYGENERALE'];
genererCourbe($moyennes, $eleve);
$courbe = SITE_ROOT . "public/tmp/" . $eleve['IDELEVE'] . ".png";
示例15: headAdminCollect
require_once "collect_fun.php";
require_once "api_collect_youku_cj.php";
headAdminCollect("优酷视频采集");
define("VIDEOS", "https://openapi.youku.com/v2/shows/videos.json?client_id=715115c589f8533a&show_id={id}&page=1&count={count}");
define("SHOWINFO", "https://openapi.youku.com/v2/shows/show.json?client_id=715115c589f8533a&show_id={id}");
$action = be("get", "action");
$contentparmStart = "showid_en=\"";
$contentparaend = "\";";
if (isset($action) && $action === 'collectSimpl') {
$type_id = be("all", "type_id");
$web_url = be("all", "web_url");
$site_url = be("all", "site_url");
$id = '';
if (!isN($web_url)) {
$content = getPage($web_url, 'utf-8');
$id = getBody($content, $contentparmStart, $contentparaend);
} else {
if (!isN($site_url) && preg_match('/id_z(\\w.+?).html/', $site_url)) {
$ids = preg_match_all('/id_z(\\w.+?).html/', $site_url, $match);
$id = $match[1][0];
} else {
errmsg("采集提示", "采集信息不能为空");
}
}
$content = getYoukuInfo($id, $type_id);
$pid = '';
$category = "电影";
switch ($type_id) {
case "1":
//电影
$pid = "177";