0byt3m1n1
Path:
/
data
/
17
/
1
/
18
/
11
/
1670011
/
user
/
1801231
/
htdocs
/
marketting
/
system
/
application
/
models
/
[
Home
]
File: xml_rpc_model.php
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); /* | ------------------------------------------------------------------------- | COPYRIGHT NOTICE | Copyright 2008 JROX Technologies, Inc. All Rights Reserved. | ------------------------------------------------------------------------- | This script may be only used and modified in accordance to the license | agreement attached (license.txt) except where expressly noted within | commented areas of the code body. This copyright notice and the | comments above and below must remain intact at all times. By using this | code you agree to indemnify JROX Technologies, Inc, its corporate agents | and affiliates from any liability that might arise from its use. | | Selling the code for this program without prior written consent is | expressly forbidden and in violation of Domestic and International | copyright laws. | | ------------------------------------------------------------------------- | FILENAME - xml_rpc_model.php | ------------------------------------------------------------------------- | | This model handles the functions for managing content | */ class Xml_Rpc_Model extends Model { function _notify_update_services($data = '') { $this->load->library('xmlrpc'); $this->xmlrpc->set_debug(false); $update_urls = $this->config->item('sts_content_update_services'); if (!empty($update_urls)) { $urls = explode("\n", $update_urls); foreach ($urls as $v) { $this->xmlrpc->server($v, 80); $this->xmlrpc->method('weblogUpdates.ping'); $request = array($data['content_title'], $data['url']); $this->xmlrpc->request($request); if ( ! $this->xmlrpc->send_request()) { //log error log_message('error', 'could not send request to ' . $v . ' for content update'); } else { //log success log_message('info', 'content update sent to ' . $v . ' successfully'); } //echo '<pre>'; print_r($this->xmlrpc->display_response()); } } } // ------------------------------------------------------------------------ } ?>