function edit_todayhumor_bob($dom, $url)

 {

  $dom1 = explode("\"writerInfoContents\"", $dom);

  $dom2 = explode("<!--writerInfoContents-->", $dom1[1]);

  $dom3 = explode("<!-- writerInfoContainer -->", $dom2[1]);

  $dom4 = explode("<!--viewContentText-->", $dom3[1]);

 

  $dom44 = explode("<!--viewSubjectDiv-->", $dom4[0]);

  preg_match("/viewSubjectDiv\">\s(.*?)<\/div/", $dom44[0], $tmp_subject);

  $subject = trim(strip_tags($tmp_subject[1]));

  if($this->original_date) {

   preg_match("/(\d{4}\/\d{2}\/\d{2} \d{2}:\d{2}:\d{2})/", $dom2[0], $tmp_datetime);

   $datetime = $tmp_datetime[0];

  } else {

   $datetime = date('Y-m-d H:i:s');

  }

  $dom5 = explode('viewContentText">', $dom4[0]);

  $dom5[1] = substr(trim($dom5[1]), 0, strlen(trim($dom5[1]))-6);

  $content = preg_replace("/>\s+</", "><", trim($dom5[1]));

  list($content, $file_match, $element_count) = $this->what_have($content, $this->target_element, $this->save_element);

  list($content, $thumbnail) = $this->edit_file_source($content, $file_match, $element_count);

  $dom5 = explode("<!---->", $dom4[0]);

  preg_match_all("/file_download\('.(.*?)', '(.*?)',/", $dom4[0], $tmp_torrent);

  preg_match_all("/<span class=mw_basic_view_file_info> \((.*?)\)/", $dom5[0], $tmp_torrent2);

  if(count($tmp_torrent[1]) > 0) {

   $file['url'] = $tmp_torrent[1];

   $file['name'] = $tmp_torrent[2];

   $file['size'] = $tmp_torrent2[1];

   $torrent = $this->save_torrent_rg($file);

  }

  if($this->clean_tag) $content = $this->remove_tag($content);

  return array('category'=>$category, 'content'=>$content, 'thumbnail'=>$thumbnail, 'datetime'=>$datetime, 'element_count'=>$element_count, 'subject'=>$subject, 'file'=>$torrent, 'url'=>$url);

 }

2017/02/11 19:21 2017/02/11 19:21

Trackback Address :: 이 글에는 트랙백을 보낼 수 없습니다