1
wishcraft
Ticker Example - Stocks and Quotes [xoops_currency_ticker.php]

Hi all I have been working on a Ticker over the even cause some on found my folder from ages ago.. Most people don't understand the natural flow of checking information on another site, this is that php script that I will slowly release, remember at the moment it is flashing up debug SQL RSS Queue Cards at the moment. * This is the sort of extent you have to goto to use some sort of quote_c... class http://ticker.chronolabs.org.au/?trade=DXD It has an .htaccess and a few those ahh SQL issues, with that whole nature of a currency .. ticker -> I have made a few versions.

/**
 * $Id: index.php v 2.06 November 2008 Wishcraft $
 * Class: Financial Quote Class
 * Version: v1.09
 * Release Date: 17 Oct 2008 *
 * Author: Simon Roberts
 * URL: http://www.chronolabs.org.au
 * Licence: PSDL 1.4
 */
 
/*
######################################################################################################
## Data Structures - Only Require Table for RSS Ticker 
######################################################################################################
##    CREATE TABLE IF NOT EXISTS `currencies` (
##      `currency_id` int(22) NOT NULL auto_increment,
##      `default` tinyint(2) NOT NULL,
##      `code` varchar(3) NOT NULL default '---',
##      `to` varchar(3) NOT NULL default '---',
##      `secure_uri` mediumtext NOT NULL,
##      `title` varchar(128) NOT NULL,
##      `rate` double(29,29) unsigned zerofill NOT NULL default '0.00000000000000000000000000000',
##      `last_updated` int(11) default NULL,
##      `recheck` int(11) NOT NULL default '0',
##      `update_sha1` varchar(44) NOT NULL,
##      `tstamp_sha1` varchar(44) NOT NULL,
##      PRIMARY KEY  (`currency_id`)
##    );
######################################################################################################    
*/


####3333333333333333333333333333333333333333
#### Trade Variables
#### ob_start("ob_gzhandler");
foreach ($_GET as $x => $k)
    if(isset(
$_GET["$x"]))
        ${
strtolower($x)} = (string)$k;    
#############################################

    
class quote_rate
    
{  
        var 
$sessionid;
        
          function 
quote_rate()
        {
/*            if (!session_id())
                session_start();*/
                
            //$this->sessionid = //session_id();
        
}
        
        function 
rate($func$from$to)
        {
            return 
$this->$func($from$to);
        }
        
        private function 
quote_oanda_currency($code$trade) {
            
$uri 'http://www.oanda.com/convert/fxdaily?value=1&redirected=1&exch=' $code .  '&format=CSV&dest=Get+Table&sel_list=' .  $trade;
            
$page file($uri);
        
            
$match = array();
        
            
preg_match('/(.+),(w{3}),([0-9.]+),([0-9.]+)/i'$page$match);
                    
            if (
count($match))
                return array(
"type" => 'oanda'"match" => $match"uri" => $uri);
        
          }
        
        private function 
quote_xe_currency($from$to) {
            
$uri "http://www.xe.net/ucc/convert.cgi?Amount=1&From=" $from '&To=' $to;
            
$page file($uri);
        
            
$match = array();
        
            
preg_match('/[0-9.]+s*' $from 's*=s*([0-9.]+)s*' $to '/'implode(''$page), $match);
            if (
count($match))
                return array(
"type" => 'xe'"match" => $match"uri" => $uri);    
        }
     
  }
  
  
  function 
create_clean_self($clean_self)
  {
          foreach (
$clean_self as $element => $selfaddr)
        {
            
$aed = (strlen($self)>0)?"&":"";
            
$self .= "$element=$selfaddr".$aed;
        }    
          return 
$self;
  }
  
  
  function 
seed_ticker_once($clean_self)
  {
          global 
$clean_self$xoopsDB;
        
error_reporting(0);
        
/*
        if (!$xoopsUser->isAdmin())
            return ;
            
        if ((is_object($xoopsUser)&&!empty($xoopsUser))&&$xoopsUser->isAdmin());
        {
            if ($userhash <> sha1($xoopsUser->getVar('lastlogin').$xoopsUser->getVar('uname').$xoopsUser->getVar('pass').XOOPS_URL))
            {
            */    
                
$sql "select count(*) as xzero " $xoopsDB->prefix('currencies') . " where rate = 0 or rate < 0.000000000000000000078568743564543";
                
$debu.= $debug?"* ".__LINE__." : $sqln":'';
                
$xzero $xoopsDB->fetchRow($xoopsDB->queryF($sql));
                
                if (
$xzero>2)
                {
                    
srand(microtime);
                            
                    
$sql "select currency_id from " $xoopsDB->prefix('currencies') . " where (rate = 0 or rate < 0.00000000000000000000000000000021432543653454) ORDER BY RAND()";
                    list(
$currency_id) = $xoopsDB->fetchRow($xoopsDB->queryF($sql));
                    
$debu.= $debug?"* ".__LINE__." : $sqln":'';
                    
$sql "update " $xoopsDB->prefix('currencies') . " set rate = '%s', last_updated = '%s', tstamp_sha1 = sha1('%s'), update_sha1 = '%s', source_uri = '%s', recheck = '%s' where currency_id = '%s'";
                    
$debu.= $debug?"* ".__LINE__." : $sqln":'';
                    
$ret $xoopsDB->queryF(sprintf($sqlsubstr((string)(microtime/10001),mt_rand(3,8)), time()+((10*2)*2), time().microtime(), sha1($sql), time()+-20$currency_id));
                    
                    
redirect_header(sprintf('http%s://%s/%s',$secure,$_SERVER['HTTP_HOST'],create_clean_self($clean_self)),3,"You have seeded the ticker, please resume until seeded correctly.$secure,$_SERVER['HTTP_HOST'],create_clean_self($clean_self))."'>Redirect back to ticker
Please wait to redirect to you enter url!", true);                    
                    exit;
                }
            
            
        }

error_reporting(E_ALL);  

  define('
CURRENCY_SERVER_PRIMARY', 'oanda');
  define('
CURRENCY_SERVER_BACKUP', 'xe');
  define('
SECONDARY_PRIMARY_CODE', 'AED');
  
    include_once('
../mainfile.php');
    require_once(XOOPS_ROOT_PATH.'
/class/module.textsanitizer.php');
    global $xoopsDB, $clean_self, $xoopsUser;
    #include_once(XOOPS_ROOT_PATH.'
/include/checklogin.php');

    
    $feed=array();
    
    $clean_self = array();
    
    $ii=1;
    if (strlen($trade)!=3) {
    
        $sql = "select currency_id, code, rate, title, last_updated, source_uri from " . $xoopsDB->prefix('
currencies'). " where (not `default` = '0') or (`to` = '".SECONDARY_PRIMARY_CODE."')";
        $debu.= $debug?"* ".__LINE__." : $sqln":'';
        $ret = $xoopsDB->query($sql);
        $default_cur=$xoopsDB->fetchArray($ret)    ;
        
        $feed[$ii]['
code'] = $default_cur['code'];
        $feed[$ii]['
title'] = $default_cur['title'];
        $feed[$ii]['
rate'] = $default_cur['rate'];
        $feed[$ii]['
mode'] = 'trade';
        $feed[$ii]['
pubdate'] = $default_cur['last_updated'];        
        $feed[$ii]['
uri'] = $default_cur['source_uri'];        
        
        $ii++;

    } else {
        
        $sql = "select currency_id, code, title, last_updated from " . $xoopsDB->prefix('
currencies'). ' where `code` = "'.$trade.'" and `to` = "'.$trade.'"';
        $debu.= $debug?"* ".__LINE__." : $sqln":'';
        $ret = $xoopsDB->query($sql);
        $default_cur=$xoopsDB->fetchArray($ret)    ;
        $feed[$ii]['
code'] = strtoupper($trade);
        if (strlen($default_cur['
title']))
        {
        /*********************************
             $rate = new quote_rate('
quote_oanda_currency', $feed[1]['code'], $currency['code']);
              
              $quote = $rate->rate('
quote_oanda_currency', $feed[1]['code'], $currency['code']);
              
              if (empty($quote['
type'])) {
                    $rate = new quote_rate('
quote_xe_currency', $feed[1]['code'], $currency['code']);
                    $quote = $rate->rate('
quote_oanda_currency', $feed[1]['code'], $currency['code']);
              }

              if (!empty($quote['
type']))    
                $title = $quote['
match'][1]; 
        *********/
        } else {
                $feed[$ii]['
title'] = $default_cur['title'];
        }    
        
        $feed[$ii]['
title'] = $title;
        $feed[$ii]['
mode'] = 'trade';
        $feed[$ii]['
rate'] = '1.000000';
        $feed[$ii]['
pubdate'] = (0!=$item['last_updated'])?$item['last_updated']:time();
        $feed[$ii]['
uri'] = $item['source_uri'];    
        $ii++;
        
    }

    $clean_self['
trade'] = (isset($feed[$ii]['code'])&&(strlen($feed[$ii]['code'])==3))?$feed[$ii]['code']:'';

    if (isset($_GET['
seed'])&&strlen($_GET['seed'])>0)
        @seed_ticker_once($clean_self);
    
    $sql = "select select count(a.*) as total, `b`.`code` from " . $xoopsDB->prefix('
currencies'). ' a INNER JOIN ' . $xoopsDB->prefix('currencies'). ' b on a.to b.to where `b`.`default` = 1';
    $debu.= $debug?"* ".__LINE__." : $sqln":'';
    list($defutotal, $default_code) = $xoopsDB->fetchRow($xoopsDB->query($sql));
    
    $sql = "select distinct count(*) as total from ".$xoopsDB->prefix('
currencies'). ' a INNER JOIN ' . $xoopsDB->prefix('currencies'). ' b on a.to b.code where `a`.`to` = '. $feed[1]['code']."' and  `a`.`code` = '". $feed[1]['code']."' having LENGTH(a.to) = and LENGTH(b.code) = and a.to <> '$default_code' and a.code <> '$default_code'";
    
$debu.= $debug?"".__LINE__." $sqln":'';
//    echo "
".__LINE__." $sqln";
    list(
$codetotal) = $xoopsDB->fetchRow($xoopsDB->query($sql));
    
    
$sql = "select count(*) as curr_count from ". $xoopsDB->prefix('currencies'). ' b where not `b`.`to` = '. $feed[1]['curr_count']."'";
    $debu.= $debug?"* ".__LINE__." : $sqln":'';
//    echo "* ".__LINE__." : $sqln";
    list($curr_count) = $xoopsDB->fetchRow($xoopsDB->query($sql));

    if ($curr_count>=1)
    {
        if (strlen($feed[1]['
title'])>3&&is_string($feed[1]['title']))
        {
            $sql = "INSERT INTO ".$xoopsDB->prefix('
currencies')." (`code`, `title`, `rate`, `to`) VALUE ('".$feed[1]['code']."', '".$feed[1]['title']."', '1', '".$feed[1]['code']."')";
            @$xoopsDB->queryF($sql);
            $debu.= $debug?"* ".__LINE__." : $sqln":'';
            $sql = "INSERT INTO ".$xoopsDB->prefix('
currencies')." (`code`, `title`, `rate`, `to`) VALUE ('".$feed[1]['code']."', '".$feed[1]['title']."', '1', '".$default_code."')";
            $debu.= $debug?"* ".__LINE__." : $sqln":'';
            @$xoopsDB->queryF($sql);
            
            if (strpos(XOOPS_URL,'
s://')>0)
                
$secure "s";
            else
                
$secure "";

            
redirect_header(sprintf('http%s://%s/%s',$secure,$_SERVER['HTTP_HOST'],create_clean_self($clean_self)),3,"Thank's you have imported a new currency;center">Update Total Currencies: $curr_count
Update Currency Title: "
.$feed[1]['title']."
Currency Code: $uri'>".$feed[1]['title']."

Please wait to redirect to the url you enter this ticker!"
true"$uri'>Goto the location of the import of currency data.");
            exit;
        }
    }

    if ((
$codetotal $defutotal-1)>1)
    {
        
$sql "INSERT INTO ".$xoopsDB->prefix('currencies')." (`code`, `title`, `rate`, `to`) select distinct (b.`code`, b.`title`, '1', '".$feed[1]['code']."') from " $xoopsDB->prefix('currencies')." a INNER JOIN " $xoopsDB->prefix('currencies'). ' b on a.code <> b.to where a.code = ''.$feed[1]['code'].'' OR b.code = ''.$feed[1]['code'].'' having `b`.`default` = 1 having LENGTH(a.to) = 3 and LENGTH(b.code) = 3 and a.to <> "'.$feed[1]['code'].'" and a.code <> "'.$feed[1]['code'].'" ORDER RAND()';
        
$debu.= $debug?"* ".__LINE__." : $sqln":'';
        @
$xoopsDB->queryF($sql);
        
        
redirect_header(sprintf('http%s://%s/%s',$secure,$_SERVER['HTTP_HOST'],create_clean_self($clean_self)),3,"The feed filter has been imported for a recently imported - unknown currencies.
Currencies matrix build (Compare): ."
.($defutotal-1)-$codetotal."
Currency Code: "
."$secure,$_SERVER['HTTP_HOST'],create_clean_self($clean_self))."'>".$feed[1]['title']."
Please wait to redirect to you enter url!", true);        
        exit;
    }
    
    $sql = sprintf("select count(*) as requote from " . $xoopsDB->prefix('
currencies'). " where (not `default` = 1 or `to` = '%s') and `code` NOT LIKE '%s' and ((last_updated + %s) < '%s') or ((recheck + %s) < '%s'))",$feed[1]['code'],$feed[1]['code'],((60*60)*12),time(),(61*34),time());
    $debu.= $debug?"* ".__LINE__." : $sqln":'';
    list($requote) = $xoopsDB->fetchRow($xoopsDB->queryF($sql));
    
    if ($requote>0)
    {        

        $sql = sprintf("select code, title, rate, last_updated, source_uri from " . $xoopsDB->prefix('
currencies'). " where (not last_updated = 0 and (not `default` = 1 or `to` = '%s')) and `code` NOT LIKE '%s' and (rate = 1 or ((last_updated + %s) < '%s') or ((recheck + %s) < '%s'))",$feed[1]['code'],$feed[1]['code'],((60*60)*12),time(),(61*34),time());
        $debu.= $debug?"* ".__LINE__." : $sqln":'';
        $ret = $xoopsDB->query($sql);
        while ($item = $xoopsDB->fetchArray($ret))
        {
        
            $feed[$ii]['
code'] = $item['code'];
            $feed[$ii]['
title'] = $item['title'];
            $feed[$ii]['
rate'] = $item['rate'];
            $feed[$ii]['
mode'] = 'no requote';
            $feed[$ii]['
pubdate'] = $item['last_updated'];
            $feed[$ii]['
uri'] = $item['source_uri'];
            $ii++;
        }
        
        $sql = sprintf("select currency_id, code, title, rate from " . $xoopsDB->prefix('
currencies'). " where (not last_updated = 0 and (not `default` = 1 or `to` = '%s')) and `code` NOT LIKE '%s' and ((last_updated + %s) < '%s') or ((recheck + %s) < '%s'))",$feed[1]['code'],$feed[1]['code'],((60*60)*12),time(),(61*34),time());
        $debu.= $debug?"* ".__LINE__." : $sqln":'';
        
        $retb = $xoopsDB->query($sql);
        while ($currency = & $xoopsDB->fetchArray($retb)) {
    
          $rate = new quote_rate('
quote_oanda_currency', $feed[1]['code'], $currency['code']);
          
          $quote = $rate->rate('
quote_oanda_currency', $feed[1]['code'], $currency['code']);
          
          if (empty($quote['
type'])) {
                $rate = new quote_rate('
quote_xe_currency', $feed[1]['code'], $currency['code']);
                $quote = $rate->rate('
quote_oanda_currency', $feed[1]['code'], $currency['code']);
          }
          
               
          if (!empty($quote['
type'])) {
    
            switch ($quote['
type'])
            {
                case "xe":
                    if (($quote['
match'][1]!=1)&&($quote['match'][1]!=$currency[2]))
                    {
                        $sql = "update " . $xoopsDB->prefix('
currencies') . " set rate = '%s', last_updated = '%s', tstamp_sha1 = sha1('%s'), update_sha1 = '%s', source_uri = '%s' where currency_id = '%s'";
                        $ret = $xoopsDB->queryF(sprintf($sql, $quote['
match'][1], time(), time()+microtime(), sha1($sql), $currency['currency_id'],  $quote['uri']));
                        $feed[$ii]['
code'] = $currency[1];
                        $feed[$ii]['
title'] = $currency[2];
                        $feed[$ii]['
rate'] = ($quote['match'][1]==1)?$currency[3]:$quote['match'][1];
                        $feed[$ii]['
mode'] = 'requote';
                        $feed[$ii]['
pubdate'] = time();
                        $feed[$ii]['
uri'] = $quote['uri'];
                        break;
                    } else {
                        $sql = "update " . $xoopsDB->prefix('
currencies') . " set recheck = '%s', update_sha1 = '%s' where currency_id = '%s'";
                        $ret = $xoopsDB->queryF(sprintf($sql, time(), sha1($sql), $currency['
currency_id']));
                    
                        $sql = sprintf("select code, title, rate, last_updated, source_uri from " . $xoopsDB->prefix('
currencies'). " where code = '%s'", $currency['code']);
                        $item = $xoopsDB->fetchArray($xoopsDB->query($sql));
                        if ($item['
rate']!=0&&$item['rate']!=1)
                        {
                        
                            $feed[$ii]['
code'] = $item['code'];
                            $feed[$ii]['
title'] = $item['title'];
                            $feed[$ii]['
rate'] = $item['rate'];
                            $feed[$ii]['
mode'] = 'no requote';
                            $feed[$ii]['
pubdate'] = $item['last_updated'];
                            $feed[$ii]['
uri'] = $item['source_uri'];
                            $ii++;                    
                        }            
                    }
                case "oanda":
                    if ($quote['
match'][1]!=1)
                    {

                        if (($currency[3]!=$quote['
match'][3])&&($quote['match'][1]!=$currency[2]))
                            $sql = "update " . $xoopsDB->prefix('
currencies') . " set , $source_uri='%s', title = '%s', rate = '%s', last_updated = '%s', recheck = '%s',tstamp_sha1 = sha1('%s'), update_sha1 = '%s' where currency_id = '%s'";
                        else
                            $sql = "update " . $xoopsDB->prefix('
currencies') . " set $source_uri='%s', rate = '%s', last_updated = '%s', recheck = '%s', tstamp_sha1 = sha1('%s'), update_sha1 = '%s' where currency_id = '%s'";
                        
                        if ($currency[2]!=$quote['
match'][1])
                            $ret = $xoopsDB->queryF(sprintf($sql, $quote['
uri'], $quote['match'][1], $quote['match'][3], time(), time(), sha1($sql), $currency['currency_id']));
                        else
                            $ret = $xoopsDB->queryF(sprintf($sql, $quote['
uri'], $quote['match'][3], time(), time(), sha1($sql), $currency['currency_id']));
                            
                        $feed[$ii]['
code'] = $quote['match'][2];
                        $feed[$ii]['
title'] = $quote['match'][1];
                        $feed[$ii]['
rate'] = ($quote['match'][1]==1)?$currency[3]:$quote['match'][1];
                        $feed[$ii]['
pubdate'] = time();
                        $feed[$ii]['
mode'] = 'requote';
                        $feed[$ii]['
uri'] = $quote['uri'];
                        break;
                    } else {
                    
                        $sql = "update " . $xoopsDB->prefix('
currencies') . " set rate = '%s', last_updated = '%s', tstamp_sha1 = sha1('%s'), update_sha1 = '%s' where currency_id = '%s'";
                        $ret = $xoopsDB->queryF(sprintf($sql, $quote['
match'][1], time(), time()+microtime(), sha1($sql), $currency['currency_id']));
                    
                        $sql = sprintf("select code, title, rate, last_updated, source_uri from " . $xoopsDB->prefix('
currencies'). " where code = '%s'", $currency['code']);
                        $item = $xoopsDB->fetchArray($xoopsDB->query($sql));
                        if ($item['
rate']!=0&&$item['rate']!=1)
                        {
                        
                            $feed[$ii]['
code'] = $item['code'];
                            $feed[$ii]['
title'] = $item['title'];
                            $feed[$ii]['
rate'] = $item['rate'];
                            $feed[$ii]['
mode'] = 'no requote';
                            $feed[$ii]['
pubdate'] = $item['last_updated'];
                            $feed[$ii]['
uri'] = $item['source_uri'];
                            $ii++;                    
                        }            
                    }
            }
            $ii++;
         }
        }
    }
    else {
    
        $sql = sprintf("select code, title, rate, last_updated, source_uri from " . $xoopsDB->prefix('
currencies'). " where `to`='%s'", $feed[1]['code']);
        $ret = $xoopsDB->query($sql);
        while ($item = $xoopsDB->fetchArray($ret))
        {
        
            $feed[$ii]['
code'] = $item['code'];
            $feed[$ii]['
title'] = $item['title'];
            $feed[$ii]['
rate'] = $item['rate'];
            $feed[$ii]['
pubdate'] = $item['last_updated'];            
            $feed[$ii]['
mode'] = 'no requote';
            $feed[$ii]['
uri'] = $item['source_uri'];
            $ii++;
        }
    }

$mts = &MyTextSanitizer::getInstance();
    
echo '
xml version="1.0"?>'.chr(13).chr(10); ?>
  

 
  
 echo $mts->htmlSpecialChars($xoopsConfig['sitename']);?> : echo ($requote>0)?"$requote recheck Items : ":""?> : echo $mts->htmlSpecialChars($xoopsConfig['slogon']); ?> 
 echo date("D, Y-m-d H:i:s"time());?> UTC 
 http://backend.userland.com/rss/ 
 echo $mts->htmlSpecialChars($xoopsConfig['sitename']);?> 
 echo  $mts->htmlSpecialChars($xoopsConfig['adminemail']);?> 
 echo $mts->htmlSpecialChars($xoopsConfig['adminemail']);?> 
 en 
  
      <span style="color: #0000BB"><? </span><span style="color: #007700">echo </span><span style="color: #0000BB">$mts</span><span style="color: #007700">-></span><span style="color: #0000BB">htmlSpecialChars</span><span style="color: #007700">(</span><span style="color: #0000BB">$xoopsConfig</span><span style="color: #007700">[</span><span style="color: #DD0000">'sitename'</span><span style="color: #007700">]);</span><span style="color: #0000BB">?></span> 
      echo XOOPS_URL;?>/images/Spotlight.png 
      echo XOOPS_URL;?> 
   
 <span style="color: #0000BB"><? </span><span style="color: #007700">echo </span><span style="color: #0000BB">$xoopsConfig</span><span style="color: #007700">[</span><span style="color: #DD0000">'sitename'</span><span style="color: #007700">];</span><span style="color: #0000BB">?></span> : Currencies Trade  
 echo $mts->htmlSpecialChars(sprintf('http%s://%s/%s',$secure,$_SERVER['HTTP_HOST'],create_clean_self($clean_self))); ?> 

foreach ($feed as $item)
    
$adv += $item['rate'];

$cout = array();

foreach (
$feed as $item
 if (!
in_array($item['code'],$cout)&&($feed[1]['code']!=$item['code']&&($item['rate']!=1&&$item['rate']!=0)))
 {
     
$cout[] = $item['code'];
?>
Currency :<span style="color: #0000BB"><?php  </span><span style="color: #007700">echo </span><span style="color: #0000BB">$mts</span><span style="color: #007700">-></span><span style="color: #0000BB">htmlSpecialChars</span><span style="color: #007700">(</span><span style="color: #0000BB">$item</span><span style="color: #007700">[</span><span style="color: #DD0000">'title'</span><span style="color: #007700">] .</span><span style="color: #DD0000">' ('</span><span style="color: #007700">.</span><span style="color: #0000BB">$item</span><span style="color: #007700">[</span><span style="color: #DD0000">'code'</span><span style="color: #007700">] .</span><span style="color: #DD0000">') - '</span><span style="color: #007700">.</span><span style="color: #0000BB">round</span><span style="color: #007700">(</span><span style="color: #0000BB">$item</span><span style="color: #007700">[</span><span style="color: #DD0000">'rate'</span><span style="color: #007700">],</span><span style="color: #0000BB">6</span><span style="color: #007700">).</span><span style="color: #DD0000">'' </span><span style="color: #007700">); </span><span style="color: #0000BB">?></span>
Currency Exchange Rate : echo $mts->htmlSpecialChars($item['title'] .' ('.$item['code'] .') - '.round($item['rate'],6).'' ); ?> 
if (($adv/sizeof($feed))>$item['rate']) ?>
    lower
    
if (($adv/sizeof($feed))<$item['rate']) ?>
    higher

echo $mts->htmlSpecialChars((float)($feed[1]['rate'] * ($item['rate']/($adv/sizeof($feed))))); ?>
echo $mts->htmlSpecialChars($item['mode']); ?>
echo $mts->htmlSpecialChars($item['title']); ?>
echo $mts->htmlSpecialChars($item['code']); ?>
echo $mts->htmlSpecialChars($item['rate']); ?>
echo$mts->htmlSpecialChars$feed[1]['code']);?>
echo $mts->htmlSpecialChars($item['code']);?>
echo $mts->htmlSpecialChars($item['uri']); ?>
echo date("D, Y-m-d H:i:s"$item['pubdate']);?> UTC
 
  }

if (
$debu!=""&&($debug<>false))
{
?>
Debug : <span style="color: #0000BB"><?php </span><span style="color: #007700">echo </span><span style="color: #0000BB">md5</span><span style="color: #007700">(</span><span style="color: #0000BB">$debu</span><span style="color: #007700">); </span><span style="color: #0000BB">?></span>
echo $mts->htmlSpecialChars($debu); ?> 
debug
0.0
debug
debug
NON
0.0
0.0
0.0
echo XOOPS_URL?>
echo date("D, Y-m-d H:i:s"time);?> UTC
 
 ?>
 
" it is one of those you needed one... " - You may have to refactorise into XOOPS classes for permissions with the grouping system... Well like most tickers this one is self learning, no more I give you my CSV preset for your database, let it learn and search for real currencies you work'ng.. Here it he process
 {- page hit cycle 1) * New Currency http://ticker.chronolabs.org.au/?trade=FOO - Check for existence - If none and confrm real currency make primary matrix keys 2) * Another hit http://ticker.chronolabs.org.au/?trade=GOO - Propogates Matrix and refreshed screen 3) * Currency Appears 
{- PSDL 1.1 - Currency Saftey Mechansism 1) * Internal Zero Seeder - Unsigned rate - Periodic Reseed on financial crisis day 2) * Light Weight XML (RSS 2.0 - Simple) 3) * Self Research and Propogation
{- PSDL 1.2.1 - Subdomains 1) * As per usual subdomain abstraction for ticker component are in reverse order. - http://ticker.chronolabs.org.au/?trade=FXO (Master domain) - http://currency.ticker.chronolabs.org.au/?trade=FXO (Sub Domain of Service)
Resized Image
http://www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/RegaltyFamily
github.com/Chronolabs-Cooperative
facebook.com/DrAntonyRoberts

2
wishcraft
Re: Ticker Example - Stocks and Quotes [xoops_currency_ticker.php]

Financial Crisis Day - PSDL 1.1.1

See in an example of a process with a ticker and a 'financial crisis day' the database and data can roll down to fluxation of floating points like 0.00000000000000000000001 + (not much)..

The idea in this is to run a seeding pattern through your financial network, not only will this in such a system in the physics of computing will see the architecture of your fiscal computing tier, believe it or not there is nothing to monitor anyway..

So you can watch impressions of a seed in whatever the was in the 'worth' of the busines structure - graphs and so on in things like future trades on a FCD aren't there but in the function of you see it so it is, but there is also no way to lay in a course to the next in such thing..

It is a very interesting day...
Resized Image
http://www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/RegaltyFamily
github.com/Chronolabs-Cooperative
facebook.com/DrAntonyRoberts

3
wishcraft
Re: Ticker Example - Stocks and Quotes [xoops_currency_ticker.php]

Yes I know a ticker plugin system, thats okey - I am thinking about writting when I get to the multixoops soon, a ticker system. that does that sort of thing, that is the base of the currency..

You know where you monitor what you are thinking about in a ticker system. I don't know I see all those companies that you know "Charge for feeds" I don't know why they don't use something I am going to make..

You can even wire that plugin there into X-Soap quiet easy. And feed it onward.

The ticker system you could build for currency in the multidomain stuff is like that RSS is a light weight format it would exchange even faster than an API, in push those numbers.. For example with any SOAP Tunnel it encrypts basis on eithers personal information and serialises (to lock ciphers).. Then on with the transaction..

Anyway the trade is like this..

* http://clt.currency.ticker.chronolabs.net/?trade=FOO -> this is when you trade FOO against CLT...
* http://clt.currency.ticker.chronolabs.net/?trade=BAR -> this is when you trade BAR against CLT...

or for example further more:

* http://usd.currency.ticker.chronolabs.net/?trade=MXO -> this is when you trade MXO against usd...

and so on..

Any suggestion about ticker plugin sets - where you can make subdomains with plug-ins to cPanel and stuff.. So it propogates on adding a Plugin Set for a subdomain like currency.ticker.yoursite.com and so on. so the module ticker -> with for example plugin set currency which breaks out to subdomains propogation with the further subdomain plugin sets...



Resized Image
http://www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/RegaltyFamily
github.com/Chronolabs-Cooperative
facebook.com/DrAntonyRoberts

Login

Who's Online

302 user(s) are online (251 user(s) are browsing Support Forums)


Members: 0


Guests: 302


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits