"Fossies" - the Fresh Open Source Software Archive

Member "Open-Web-Analytics-1.7.0/queue.php" (16 Sep 2020, 1553 Bytes) of package /linux/www/Open-Web-Analytics-1.7.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "queue.php" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 1.6.9_vs_1.7.0.

    1 <?php
    2 
    3 //
    4 // Open Web Analytics - An Open Source Web Analytics Framework
    5 //
    6 // Copyright 2006 Peter Adams. All rights reserved.
    7 //
    8 // Licensed under GPL v2.0 http://www.gnu.org/copyleft/gpl.html
    9 //
   10 // Unless required by applicable law or agreed to in writing, software
   11 // distributed under the License is distributed on an "AS IS" BASIS,
   12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   13 // See the License for the specific language governing permissions and
   14 // limitations under the License.
   15 //
   16 // $Id$
   17 //
   18 
   19 ignore_user_abort(true);
   20 set_time_limit(180);
   21 
   22 include_once('owa_env.php');
   23 require_once(OWA_BASE_DIR.'/owa.php');
   24 
   25 /**
   26  * Remote Event Queue Endpoint
   27  * 
   28  * @author      Peter Adams <peter@openwebanalytics.com>
   29  * @copyright   Copyright &copy; 2006 Peter Adams <peter@openwebanalytics.com>
   30  * @license     http://www.gnu.org/copyleft/gpl.html GPL v2.0
   31  * @category    owa
   32  * @package     owa
   33  * @version        $Revision$
   34  * @since        owa 1.3.0
   35  */
   36 
   37 $owa = new owa();
   38 
   39 if ( $owa->isEndpointEnabled( basename( __FILE__ ) ) ) {
   40 
   41 
   42     $owa->setSetting('base', 'is_remote_event_queue', true);
   43     $owa->e->debug('post: ' . print_r($_POST, true) );
   44     $raw_event = owa_coreAPI::getRequestParam('event');
   45 
   46     if ( $raw_event ) {
   47 
   48         $dispatch = owa_coreAPI::getEventDispatch();
   49         $event = $dispatch->makeEvent();
   50         $event->loadFromArray($raw_event);
   51 
   52         $owa->e->debug(print_r($event,true));
   53         $dispatch->asyncNotify($event);
   54     }
   55 
   56 } else {
   57     // unload owa
   58     $owa->restInPeace();
   59 }
   60 
   61 ?>