Phppgads 2.0.7 > PhpPgAds 2.0.7 / Admin / Lib Updates.inc.php

Questions? Need Help? Want to share? » PHP Forum
Script Name:
Phppgads 2.0.7

Download:
phppgads-2.0.7.zip

Category:
Ad Management

Archive Content:

PhpPgAds 2.0.7

PhpPgAds 2.0.7 > Admin

PhpPgAds 2.0.7 > Admin > Report Plugins

PhpPgAds 2.0.7 > Admin

PhpPgAds 2.0.7 > Admin > Images

PhpPgAds 2.0.7 > Admin > Images > Ltr

PhpPgAds 2.0.7 > Admin > Images

PhpPgAds 2.0.7 > Admin > Images > Flags

PhpPgAds 2.0.7 > Admin > Images

PhpPgAds 2.0.7 > Admin > Images > Rtl

PhpPgAds 2.0.7 > Admin > Images

PhpPgAds 2.0.7 > Admin

PhpPgAds 2.0.7 > Admin > Templates

PhpPgAds 2.0.7

PhpPgAds 2.0.7 > Cache

PhpPgAds 2.0.7 > Client

PhpPgAds 2.0.7 > Language

PhpPgAds 2.0.7 > Language > Brazilian Portuguese

PhpPgAds 2.0.7 > Language > Chinese Big5

PhpPgAds 2.0.7 > Language > Chinese Gb2312

PhpPgAds 2.0.7 > Language > Dutch

PhpPgAds 2.0.7 > Language > English

PhpPgAds 2.0.7 > Language > English Us

PhpPgAds 2.0.7 > Language > French

PhpPgAds 2.0.7 > Language > German

PhpPgAds 2.0.7 > Language > Hebrew

PhpPgAds 2.0.7 > Language > Hungarian

PhpPgAds 2.0.7 > Language > Indonesian

PhpPgAds 2.0.7 > Language > Italian

PhpPgAds 2.0.7 > Language > Korean

PhpPgAds 2.0.7 > Language > Polish

PhpPgAds 2.0.7 > Language > Portuguese

PhpPgAds 2.0.7 > Language > Russian Cp1251

PhpPgAds 2.0.7 > Language > Russian Koi8r

PhpPgAds 2.0.7 > Language > Spanish

PhpPgAds 2.0.7 > Language > Turkish

PhpPgAds 2.0.7 > Libraries

PhpPgAds 2.0.7 > Libraries > Defaults

PhpPgAds 2.0.7 > Libraries

PhpPgAds 2.0.7 > Libraries > Layerstyles

PhpPgAds 2.0.7 > Libraries > Layerstyles > Cursor

PhpPgAds 2.0.7 > Libraries > Layerstyles > Floater

PhpPgAds 2.0.7 > Libraries > Layerstyles > Geocities

PhpPgAds 2.0.7 > Libraries > Layerstyles > Geocities > Images

PhpPgAds 2.0.7 > Libraries > Layerstyles > Geocities

PhpPgAds 2.0.7 > Libraries > Layerstyles > Simple

PhpPgAds 2.0.7 > Libraries > Layerstyles > Simple > Images

PhpPgAds 2.0.7 > Libraries > Layerstyles > Simple

PhpPgAds 2.0.7 > Libraries

PhpPgAds 2.0.7 > Libraries > Deliverycache

PhpPgAds 2.0.7 > Libraries > Geotargeting

PhpPgAds 2.0.7 > Libraries > Resources

PhpPgAds 2.0.7 > Maintenance

PhpPgAds 2.0.7 > Misc

PhpPgAds 2.0.7 > Misc > Documentation

PhpPgAds 2.0.7 > Misc

PhpPgAds 2.0.7 > Misc > Fakecron

PhpPgAds 2.0.7 > Misc > Revisions

PhpPgAds 2.0.7 > Misc > Samples

PhpPgAds 2.0.7 > Misc > Samples > Xmlrpc

PhpPgAds 2.0.7 > Misc > Samples > Xmlrpc > Php

Lib Updates.inc.php:


<?php // $Revision: 2.1.2.5 $

/************************************************************************/
/* phpPgAds                                                             */
/* ========                                                             */
/*                                                                      */
/* Copyright (c) 2001-2005 by the phpPgAds developers                   */
/* For more information visit: http://phppgads.sourceforge.net          */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/



// Prevent full path disclosure
if (!defined('phpAds_path')) die();



// Set define to prevent duplicate include
define ('LIBUPDATES_INCLUDED',  true);


// Include required files
require (phpAds_path.'/libraries/lib-xmlrpc.inc.php');



/*********************************************************/
/* XML-RPC server settings                               */
/*********************************************************/

$phpAds_updatesServer = array(
    
'host'     => 'www.phppgads.com',
    
'script' => '/updateAdsNew/xmlrpc.php',
    
'port'     => 80
);



/*********************************************************/
/* Check for updates via XML-RPC                         */
/*********************************************************/

function phpAds_checkForUpdates($already_seen 0)
{
    global 
$phpAds_config,  $phpAds_updatesServer;
    global 
$xmlrpcerruser;

    
// Create client object
    
$client = new xmlrpc_client($phpAds_updatesServer['script'],
        
$phpAds_updatesServer['host'],  $phpAds_updatesServer['port']);
    
    
// Create XML-RPC request message
    
$msg = new xmlrpcmsg("updateAdsNew.check",  array(
        new 
xmlrpcval($phpAds_config['config_version'],  "string"),
        new 
xmlrpcval($already_seen,  "string"),
        new 
xmlrpcval($phpAds_config['updates_dev_builds'] ? 'dev' '',  "string")
    ));

    
// Send XML-RPC request message
    
if($response $client->send($msg,  10))
    {
        
// XML-RPC server found,  now checking for errors
        
if (!$response->faultCode())
        {
            
$ret = array(0,  phpAds_xmlrpcDecode($response->value()));
            
            
phpAds_dbQuery("
                UPDATE
                    "
.$phpAds_config['tbl_config']."
                SET
                    updates_last_seen = '"
.$ret[1]['config_version']."',
                    updates_timestamp = "
.time()."
            "
);
        }
        else
            
$ret = array($response->faultCode(),  $response->faultString());
        
        return 
$ret;
    }
    
    return array(-
1,  'No response from the server');
}

?>



Other Ad Management Scripts:

WebMaster Resources Home

©RingsWorld.com