View Full Version : How to add my custom php dynamic Pages connected to database
hamidsa
01-30-2011, 01:55 PM
Hi
I want to add some php codes, forms and calculating routines giving my customers the ability to get their Machine ID and making for them the Registration Key to activate software whats the easiest way to do it.
I have all the codes in asp and asp.net and also have web services connected to sql server that do all the job as well. If there is a way in vbulletin to consuming web services it would be more interested.
fdifranco
02-02-2011, 01:21 AM
It sounds to me that you want to make a widget that talks to a database.
Look at this post (https://vborg.vbsupport.ru/showthread.php?p=1995625#post1995625) and it might help you.
As far as web services go, PHP makes using Web Services quite simple to use. If you have access to a WSDL file then writing a SOAP client is very simple.
Here is the code for a simple, working SOAP client from my own website. In this particular example, you can specify a season (2000-2010), a week (1-17), and a code for a team ('GB' for Green Bay, 'ATL' for Atlanta, etc) and it will tell you the score of the game:
<?php
$oSoapClient = new SoapClient("http://www.footballbook.pro/fbk.wsdl");
$szGid = $oSoapClient->getGameId(2010,7,"ATL");
$aoGameProperties = $oSoapClient->getGame($szGid);
$szVis = $aoGameProperties['vis'];
$szHome = $aoGameProperties['home'];
$iVScore = $aoGameProperties['vscore'];
$iHScore = $aoGameProperties['hscore'];
echo "The score was $szVis $iVScore - $szHome $iHScore.\n\n";
?>
You can copy the code above into a file called SoapClient.php and then run it from the command line and the output would look like this:
# php SoapClient.php
The score was CIN 32 - ATL 39.
Again, I can't say that I understand completely what you are trying to achieve but I guarantee that you can do it in PHP and integrate it into VBulletin and that's coming from a Java guy.
I have made a lot of widgets that contain forms so I know it can be done.
Good luck,
-fab
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.