vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   fetching html file using plugin (https://vborg.vbsupport.ru/showthread.php?t=221178)

Senti.Jatt 08-18-2009 11:49 AM

fetching html file using plugin
 
hey guys
im trying to use this in global_start hook

hello guyim trying to use this in global_start hook
PHP Code:

$hello $vboptions['mod_hello_active'];

$something implode(''file('$hello']')); 

when i put $something in forumhome it's not working:mad:

Dismounted 08-18-2009 12:11 PM

You're probably wanting this:
PHP Code:

$something implode(''file($vbulletin->options['mod_hello_active'])); 


Andreas 08-18-2009 12:42 PM

You probably want this:

PHP Code:

require_once(DIR '/includes/class_vurl.php');

$vurl = new vB_vURL($vbulletin);
$something $vurl->fetch_body($vbulletin->options['mod_hello_active'], 0falsefalse); 

:D

Otherwise you rely on allow_url_fopen being on, which is not necessarly the case.
Also, reading a file into an array and imploding it afterwards seems rather unnecessary overhead -> file_get_contents().

Senti.Jatt 08-18-2009 12:43 PM

what about for PHP?
PHP Code:

ob_start();
   include(
'$vbulletin->options['mod_hello_active']');
   
$includedphp ob_get_contents();
ob_end_clean(); 

--------------- Added [DATE]1250603071[/DATE] at [TIME]1250603071[/TIME] ---------------

The one that dismounted told me works...
Not i have problem with php

Andreas 08-18-2009 02:41 PM

Uuh ... remotely including PHP is extraordinary dangerous ... do you know 150% what you are doing?

Senti.Jatt 08-18-2009 03:08 PM

Yes i do can you please help?


All times are GMT. The time now is 09:08 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01074 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete