![]() |
Accessing DB in another script
I know little about writing VB scrips / mods, but I am trying to use the VB config.php to access the DB from another part of my site.
With the DB settings set to this in config.php... PHP Code:
Let's say the config.sys file is in: Code:
http://www.mysite.com/forum/includes/ |
It depends on where you place your script.
If your script is in the root and your forum is located in /forum/ then you can connect doing something like: PHP Code:
|
Quote:
Quote:
|
Based on what you want to do, you don't need to manually connect to the database but simply call the vB API externally from a different site that's on the same server.
Take a look at this blog on how to login to vB from an external site. http://www.vbulletin.com/forum/blogs...n-your-website It calls the user API to login and did not have to manually connect to vB database. |
All times are GMT. The time now is 01:57 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|