Sure let me zip it up. I'll edit my post and attach the script in a sec.
Derek
Here is the script:
PHP Code:
<?php
if ($_REQUEST['product'])
{
mysql_connect('localhost', 'username', 'password') or die('<strong>Error:</strong> Could not connect to the MySQL Server.');
mysql_select_db('database') or die('<strong>Error:</strong> Could not select database.');
$query = "SELECT version FROM versions WHERE productid = '" . mysql_real_escape_string($_REQUEST['product']) . "' LIMIT 1";
$result = mysql_query($query);
$num_rows = mysql_num_rows($result);
if ($num_rows == 1)
{
$info = mysql_fetch_array($result);
print '<version productid="' . $_REQUEST['product'] . '">' . $info['version'] . '</version>';
}
else
{
exit;
}
}
else
{
exit;
}
?>
And you will need to create a database, edit the script code with the database info, and import the following SQL:
[sql]
CREATE TABLE `versions` (
`id` int(10) unsigned NOT NULL auto_increment,
`productid` varchar(50) NOT NULL default '',
`version` varchar(10) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
INSERT INTO `versions` VALUES (1, 'productid', '1.0.0');
[/sql]
You will have to manually add products through PHPMyAdmin.
For the version check field in vB's product manage just type
http://www.yourdomain.com/file_name_...riptsproductid
Derek