vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Including a file from an external server? (https://vborg.vbsupport.ru/showthread.php?t=32984)

FleaBag 12-06-2001 11:03 AM

I wish to include files, eg headers and footers, in my vB styles from sites on other servers. Anyone have any idea how to go about achieving this via PHP? Thanks.

amykhar 12-06-2001 11:39 AM

It's actually rather easy IF you don't need to pass parameters back and forth.

you can do the include statement using a url. :)

include ("http://www.easilyaddictive.com/header.php");

for example. However, when you do this, if header.php has a variable in it such as $username, you won't be able to read it. This has given me more grief on my sites; however, I believe that it is essential for security.

Amy

FleaBag 12-06-2001 12:27 PM

Hey Amy, thanks for the reply. For some bizarre reason using includes within the vBulletin styles doesn't seem to work. At the top it says soemthing about do not directly echo out, does that have anything to do with this? Thanks again.

amykhar 12-06-2001 12:43 PM

Yes. That has a lot to do with it. Because of the location of your post, I assumed we were speaking general php and not vbulletin specific.

You will need to use the ob_start stuff to make it work.

Amy

FleaBag 12-06-2001 01:04 PM

Is there a URL you can refer me to for more help with this? Because I'm also unable to include my hosts banners at present too. Thanks, and sorry for being a pest!

amykhar 12-06-2001 01:06 PM

search vbulletin.com for information on the phpinclude template. That's the best info I can give you.

Amy

FleaBag 12-06-2001 01:50 PM

Thanks Amy, I'll have a look around. :)

boatdesign 07-10-2002 03:07 AM

Quote:

search vbulletin.com for information on the phpinclude template. That's the best info I can give you.
If anyone could give me a pointer on this as well I would appreciate it. I asked over at vbulletin.com and they said they could not help with including an external php file and to come over to vbulletin.org and ask


All times are GMT. The time now is 10:44 PM.

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.01424 seconds
  • Memory Usage 1,718KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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