- Joined
- Sep 10, 2006
- Messages
- 29
- Reaction score
- 5
first of all
the fetch everyone is complaining about
truthfully
i hate those dll fetches so i'll post a PHP one better =]
PHP Script for Fetch
DB for Fetch
and my nProtect rev 695
for hacking purposes and getting avatar codes and such
works with old gunbound.gme =] (not that old)
*attached
if i feel other stuff should be stickied i'll just edit this post =]!
u hear MasterOfSky!! =]
the fetch everyone is complaining about
truthfully
i hate those dll fetches so i'll post a PHP one better =]
PHP Script for Fetch
PHP:
<?
$url = $_SERVER['QUERY_STRING'];
list($app, $ver) = explode("&", $url);
if(!is_numeric($app) || !is_numeric($ver)) {
echo "Error";
exit();
}
if($app != round($app) || $ver != round($ver)) {
echo "Error";
exit();
}
// DB
$config['db_host'] = '127.0.0.1';
$config['db_base'] = 'gunbound';
$config['db_user'] = 'root';
$config['db_pass'] = '';
mysql_connect($config['db_host'], $config['db_user'], $config['db_pass']);
mysql_select_db($config['db_base']);
$dbapp = mysql_fetch_array(mysql_query("SELECT * FROM `fetchapp` WHERE AppId = '$app' "));
if($dbapp[VerLimit] == $ver){
exit();
}
if($dbapp[VerLimit] > $ver){
echo "+".$dbapp[NoticeUrl]."\n";
echo "=".$dbapp[FileUrl]."\n";
$dbfile = mysql_fetch_array(mysql_query("SELECT count(*), sum(FileSize) FROM `fetchfile` WHERE FileVer > '$ver' AND AppId = '$app' "));
echo "~".$dbfile['count(*)'].";".$dbfile['sum(FileSize)'].";".$dbapp['VerLimit']."\n";
$dbfile2 = mysql_query("SELECT * FROM `fetchfile` WHERE FileVer > '$ver' AND AppId = '$app' ");
while($data = mysql_fetch_array($dbfile2)){
echo "".$data['Command'].";".$data['FileDir'].";".$data['FileIns'].";".$data['FileVer'].";".$data['FileSize']."\n";
}
} else {
echo "Error";
}
mysql_close();
?>
Code:
CREATE TABLE `fetchapp` (
`AppId` int(11) NOT NULL default '0',
`FileUrl` varchar(50) NOT NULL,
`NoticeUrl` varchar(50) NOT NULL,
`VerLimit` int(11) NOT NULL default '0',
PRIMARY KEY (`AppId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `fetchfile` (
`AppId` int(11) NOT NULL default '0',
`Command` enum('M','R') NOT NULL default 'M',
`FileIns` varchar(50) NOT NULL default '.\\',
`FileDir` varchar(50) NOT NULL default '',
`FileVer` int(11) NOT NULL default '0',
`FileSize` int(11) NOT NULL default '0',
PRIMARY KEY (`FileDir`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
and my nProtect rev 695
for hacking purposes and getting avatar codes and such
works with old gunbound.gme =] (not that old)
*attached
if i feel other stuff should be stickied i'll just edit this post =]!
u hear MasterOfSky!! =]