Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once 'simple_html_dom.php';
- error_reporting(0);
- /**
- *
- * @package phpBB3
- * @version $Id: applciation.php,v1.0.0 2010/09/05 2:43 PM PPCW2 Exp $
- * @license http://opensource.org/licenses/gpl-license.php GNU Public License
- *
- */
- /**
- * @ignore
- */
- define('IN_PHPBB', true);
- $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
- $phpbb_admin_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
- $phpEx = substr(strrchr(__FILE__, '.'), 1);
- include($phpbb_root_path . 'common.' . $phpEx);
- include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
- include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
- include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
- // Start session management
- $user->session_begin();
- $auth->acl($user->data);
- $user->setup('common');
- $link = request_var('link', '');
- $html = file_get_html(''.$link.'');
- foreach($html->find('div[id=movie-main-image-container]') as $foto){
- $img = $foto->find('a',0)->href;
- }
- foreach($html->find('div[id=mt-content-cell]') as $tituloespanol){
- $titulo = $tituloespanol->find('span',0)->find('text',0)->plaintext;
- }
- foreach($html->find('div[id=left-column]') as $info){
- $year = $info->find('dd',1)->plaintext;
- $reparto = $info->find('dd',8)->plaintext;
- $genero = $info->find('dd',10)->plaintext;
- $sinopsis = array_pop($info->find('dl',0)->find('dd'))->plaintext;
- }
- foreach($html->find('div[id=movie-rat-avg]') as $calificacion){
- $votos = $calificacion->find('text',0)->plaintext;
- }
- $titulin = utf8_encode($titulo);
- $ano = utf8_encode($year);
- $repart = utf8_encode($reparto);
- $gen = utf8_encode($genero);
- $sinop = utf8_encode($sinopsis);
- $vot = utf8_encode($votos);
- $message = "
- [centrar][rimg]$img [/rimg][/centrar]
- [size=150][color=#400080][b]Sinopsis:[/b][/color][/size] $sinop
- [size=150][color=#400080][b]Reparto:[/b][/color][/size] $repart
- [size=150][color=#400080][b]Género:[/b][/color][/size] $gen
- [size=150][color=#400080][b]Ficha De La Película:[/b][/color][/size] $link
- [Calificacion] $vot [/Calificacion]
- ";
- $time = time();
- $rawsubject = "$titulin"; // subject of the newly made thread
- $my_subject = utf8_normalize_nfc($rawsubject, '', true);
- $my_text = utf8_normalize_nfc($message, '', true);
- $forum_id = $_POST['forum_id'];
- // variables to hold the parameters for submit_post
- $poll = $uid = $bitfield = $options = '';
- generate_text_for_storage($my_subject, $uid, $bitfield, $options, false, false, false);
- generate_text_for_storage($my_text, $uid, $bitfield, $options, true, true, true);
- $data = array(
- 'forum_id' => $forum_id,
- 'icon_id' => false,
- 'enable_bbcode' => true,
- 'enable_smilies' => true,
- 'enable_urls' => true,
- 'enable_sig' => true,
- 'message' => $my_text,
- 'message_md5' => md5($my_text),
- 'bbcode_bitfield' => $bitfield,
- 'bbcode_uid' => $uid,
- 'post_edit_locked' => 0,
- 'topic_title' => $my_subject,
- 'notify_set' => false,
- 'notify' => false,
- 'post_time' => 0,
- 'forum_name' => '',
- 'enable_indexing' => true,
- );
- submit_post('post', $my_subject, $user->data['username'], POST_NORMAL, $poll, $data);
- $redirect_url = append_sid("{$phpbb_root_path}/viewforum.$phpEx?f=$forum_id", false, true, $user->session_id);
- meta_refresh(2, $redirect_url);
- trigger_error('Application Posted' . '<br /><br />Taking you back to the forum ' . sprintf('<a href="' . $redirect_url . '">', '</a>'));
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement