Пример #1
0
 public function sendXml($data)
 {
     $responseData = '';
     try {
         $ch = NULL;
         if ($this->test) {
             $ch = curl_init('https://stg.api.payulatam.com/payments-api/4.0/service.cgi');
         } else {
             $ch = curl_init('https://api.payulatam.com/payments-api/4.0/service.cgi');
         }
         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
         // deshabilitar la validacion SSl (false)
         curl_setopt_array($ch, array(CURLOPT_POST => TRUE, CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_HTTPHEADER => array("Accept:application/xml", "Content-Type:application/xml"), CURLOPT_POSTFIELDS => $data));
         //json_encode($postData)
         $response = curl_exec($ch);
         // enviando datos al servidor de payuLatam
         if ($response === FALSE) {
             //die(curl_error($ch));
             return false;
         }
         //Creating Instance of the Class
         $xmlObj = new XmlToArray($response);
         //Creating Array
         return $arrayData = $xmlObj->createArray();
         //return ($response);//json_decode($response, TRUE); // decodificando el formato Json
     } catch (Exception $ex) {
         return false;
     }
 }
Пример #2
0
}
if ($_SESSION['stats202_by']) {
    $get['by'] = $_SESSION['stats202_by'];
}
if (!$_SESSION['stats202_by']) {
    $_SESSION['stats202_by'] = 'DESC';
}
$query = http_build_query($get);
//build the offers202 api string
$url = TRACKING202_API_URL . "/stats202/getStats?{$query}";
#echo "<p>$url</p>";
//grab the url
$data = getUrl($url);
//parse out the array
$xmlToArray = new XmlToArray($data);
$getStats = $xmlToArray->createArray();
$getStats = $getStats['getStats'];
echo "statAccountNickName";
echo "\t" . "statImpressions";
echo "\t" . "statClicks";
echo "\t" . "statActions";
echo "\t" . "statEpc";
echo "\t" . "statTotal";
if ($getStats['stats']) {
    $stats = $getStats['stats'][0]['stat'];
}
for ($x = 0; $x < count($stats); $x++) {
    if ($stats[$x]['statClicks'] > 0) {
        $stats[$x]['statClicks'] = number_format($stats[$x]['statClicks']);
    } else {
        $stats[$x]['statClicks'] = '-';
Пример #3
0
   </head>
   <body>
      <?php 
$per_page = 500;
$page = $_GET['page'];
if ($page == "") {
    $page = 1;
}
require_once "../extras/xml2array_class.php";
require_once "../extras/basico.php";
$xmlClass = new XmlToArray();
$url = "http://afiliados.catho.com.br/BuscaVagaXML.php?perfil=1&area=47&nivel=4&estado=25&pagina={$page}&total={$per_page}";
//echo $url;
$handleiItems = fopen($url, "r");
$Items = $xmlClass->getXmlData($handleiItems);
$arrayVagas = $xmlClass->createArray($Items);
$total_vagas = $arrayVagas['listing']['totalvagas'];
$completo = $page * $per_page / $total_vagas;
echo number_format($completo * 100, 2) . "%<br>";
if (sizeof($arrayVagas['listing']['vacant']) > 0) {
    foreach ($arrayVagas['listing']['vacant'] as $key => $job) {
        //title
        //date
        //company
        //description
        //branch
        //link
        //id  campo calculado
        ///////outro foreach
        //cidade
        //vagas
Пример #4
0
        $html = array_map('htmlentities', $_POST);
    }
}
//build the get query for the offers202 restful api
$get = array();
$get['apiKey'] = $_SESSION['user_api_key'];
$get['stats202AppKey'] = $_SESSION['user_stats202_app_key'];
$query = http_build_query($get);
//build the offers202 api string
$url = TRACKING202_API_URL . "/stats202/getPostBacks?{$query}";
#echo "<p>$url</p>";
//grab the url
$data = getUrl($url);
//parse out the array
$xmlToArray = new XmlToArray($data);
$getPostBacks = $xmlToArray->createArray();
template_top('Postback URLs');
include_once '../top.php';
//check for api errors
checkForApiErrors($getPostBacks);
?>


<?php 
if ($_GET['delete']) {
    echo "<div class='success'><div><h3>Your submission was successful</h3>You have deleted a postback url.</div></div>";
}
if ($success) {
    echo "<div class='success'><div><h3>Your submission was successful</h3>You have modified or created a new postback url</div></div>";
}
if ($errors) {
Пример #5
0
$TrazaStatus = false;
error_reporting(E_ALL);
require "GlobalSche.php";
$o = newObject("gtasklog");
setlimitRows(150);
$o->searchResults = $o->select("inicio<UNIX_TIMESTAMP(NOW()) AND estado='No Iniciada'");
//print_r($o->searchResults);
/*require_once("Lib/lib_google_translate.php");
  $gt = new Gtranslate;
  $data=$gt->english_to_spanish("hello world");
  $excuses = file($SYS["DOCROOT"]."../Data/excuses.txt");
  $tdata=$gt->english_to_spanish($excuses[rand(0,sizeof($excuses)-1)]);
  */
require_once "Lib/lib_class_xml_to_array.php";
$qod = new XmlToArray(file_get_contents("http://chistes.developers4web.com/rss.php"));
$arr = $qod->createArray();
$chiste = strip_tags(strtr($arr["rss"]["channel"]["item"]["description"], array("/" => "<br>")), "<br><br/><p><div><a>");
$SYS["ROOT"] = "http://172.24.81.200/~operador/globalscheduler/Backend/";
foreach ($o->searchResults as $ID => $GTASK) {
    $g = newObject("group", $GTASK->departamento);
    // Recojer responsables
    foreach ($g->listUsersInGroup() as $user) {
        if (empty($user->email)) {
            continue;
        }
        echo $GTASK->etiqueta . " " . $user->email . "\n";
        require_once "Lib/lib_phpmailer.php";
        $mail = new PHPMailer();
        $mail->AddAddress($user->email);
        $mail->IsHTML(true);
        $mail->From = $SYS["admin_email"];
Пример #6
0
         $dav->setPath($dav->path . '/content.txt');
         $dav->body = '<?xml version="1.0"?>
 <d:propertyupdate xmlns:d="DAV:" xmlns:o="urn:schemas-microsoft-com:office:office">
   <d:set>
     <d:prop>
       <o:Author>support_test</o:Author>
     </d:prop>
   </d:set>
 </d:propertyupdate>';
         $dav->addHeader("Content-Type: text/xml; charset=\"utf-8\"");
         $dav->addHeader("Content-Length: " . strlen($dav->body));
         $result = $dav->request();
         $data = substr($result['body'], $n);
         $data = str_replace("D:", "", $data);
         $xmlObj = new XmlToArray($data);
         $arrayData = $xmlObj->createArray();
         $status = $arrayData['multistatus']['response'][0]['propstat'][0]['status'];
         if (strpos($status, 'HTTP/1.1 200') === 0) {
             $cdata['lamp'] = 'green';
         }
         $cdata['text'] = __ShowMessage($mess['PROPPATCH_FILE'], $cdata['lamp']);
         //echo '<div style="padding-left:200px">'.highlight_string($result['body']).'</div>';
         break;
     case 'COPY_FILE':
         $dav->setMethod('COPY');
         $dav->setPath($dav->path . '/content.txt');
         $dav->addHeader('Destination: ' . $path . '/content_copy.txt');
         $result = $dav->request();
         if (strpos($result['headers']['STATUS'], '201 Created')) {
             $cdata['lamp'] = 'green';
             $dav->setMethod('DELETE');
Пример #7
0
}
if ($_SESSION['stats202_by']) {
    $get['by'] = $_SESSION['stats202_by'];
}
if (!$_SESSION['stats202_by']) {
    $_SESSION['stats202_by'] = 'DESC';
}
$query = http_build_query($get);
//build the offers202 api string
$url = TRACKING202_API_URL . "/stats202/getSubids?{$query}";
#echo "<p>$url</p>";
//grab the url
$data = getUrl($url);
//parse out the array
$xmlToArray = new XmlToArray($data);
$getSubids = $xmlToArray->createArray();
$getSubids = $getSubids['getSubids'];
echo "subidDate";
echo "\t" . "statAccountNickName";
echo "\t" . "subid";
echo "\t" . "subidActions";
echo "\t" . "subidAmount";
if ($getSubids['subids']) {
    $subids = $getSubids['subids'][0]['subid'];
}
for ($x = 0; $x < count($subids); $x++) {
    if ($subids[$x]['subidActions'] > 0) {
        $subids[$x]['subidActions'] = number_format($subids[$x]['subidActions']);
    } else {
        $subids[$x]['subidActions'] = '-';
    }
Пример #8
0
}
if ($_SESSION['stats202_by']) {
    $get['by'] = $_SESSION['stats202_by'];
}
if (!$_SESSION['stats202_by']) {
    $_SESSION['stats202_by'] = 'DESC';
}
$query = http_build_query($get);
//build the offers202 api string
$url = TRACKING202_API_URL . "/stats202/getOfferStats?{$query}";
#echo "<p>$url</p>";
//grab the url
$data = getUrl($url);
//parse out the array
$xmlToArray = new XmlToArray($data);
$getOfferStats = $xmlToArray->createArray();
$getOfferStats = $getOfferStats['getOfferStats'];
echo "statAccountNickName";
echo "\t" . "offerName";
echo "\t" . "offerStatImpressions";
echo "\t" . "offerStatClicks";
echo "\t" . "offerStatActions";
echo "\t" . "offerStatEpc";
echo "\t" . "offerStatTotal";
if ($getOfferStats['offerStats']) {
    $offerStats = $getOfferStats['offerStats'][0]['offerStat'];
}
for ($x = 0; $x < count($offerStats); $x++) {
    if ($offerStats[$x]['offerStatClicks'] > 0) {
        $offerStats[$x]['offerStatClicks'] = number_format($offerStats[$x]['offerStatClicks']);
    } else {
Пример #9
0
}
// echo $encobj->mdecrypt($itmhd);
// echo $itmhd; // exit;
$enc = $_POST['enctyp'];
if ($enc != 'y') {
    $enc = 'n';
}
//$file = SPATH_ROOT."/export_2010-05-07_13_49_54.csv";
//$file = SPATH_ROOT."/export_2010-05-07_13_49_54.xml";
//prints($poOrder);exit;
switch ($type) {
    case ".xml":
        $fileget = file_get_contents($filepath);
        include_once SITE_CLASS_GEN . "class.xml2array.php";
        $xmltoarobj = new XmlToArray($fileget);
        $poOrder = $xmltoarobj->createArray();
        $reqVal = $poOrder['Dataroot']['purchaseorder'];
        // prints($reqVal); exit;
        break;
    case ".csv":
        if (($handle = fopen($filepath, "r")) !== FALSE) {
            $itemstarts = 0;
            $invcode = '';
            $item = 0;
            $itemrow = 0;
            while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
                $num = count($data);
                if ($data[0] == '') {
                    $itemstarts = '2';
                }
                // Prints($data);
function convertXmlIntoArray($xml)
{
    $xmlToArray = new XmlToArray($xml);
    $arr = $xmlToArray->createArray();
    return $arr;
}
Пример #11
0
	 

<?php 
//build the get query for the offers202 restful api
$get = array();
$get['apiKey'] = $_SESSION['user_api_key'];
$get['stats202AppKey'] = $_SESSION['user_stats202_app_key'];
$query = http_build_query($get);
//build the offers202 api string
$url = TRACKING202_API_URL . "/stats202/getStatAccounts?{$query}";
#echo "<p>$url</p>";
//grab the url
$data = getUrl($url);
//parse out the array
$xmlToArray = new XmlToArray($data);
$getStatAccounts = $xmlToArray->createArray();
//check for api errors
checkForApiErrors($getStatAccounts);
?>



<table style="margin: 0px auto;">
	<tr>
		<td style="padding: 0px 0px 20px;">
			<?php 
if ($_GET['delete']) {
    echo "<div class='success'><div><h3>Your submission was successful</h3>You have deleted an account.</div></div>";
}
?>
			<?php 
Пример #12
0
/* loop through all configured URLs */
foreach ($configs as $inst => $config) {
    //echo "<tr><td class=text valign=top align=left>\n";
    /* get the status.xml URL of one config */
    $url = $config["base_url"] . "/status.xml?password="******"status_passwd"];
    $xml_data = "";
    /* open the file description to the URL */
    if ($fp = fopen($url, "r")) {
        $bgcolor = 'green';
        /* read the XML input */
        while (!feof($fp)) {
            $xml_data .= fread($fp, 200000);
        }
        fclose($fp);
        $xml_obj = new XmlToArray($xml_data);
        $status[$inst] = cleanup_array($xml_obj->createArray());
        for ($i = 0; $i < sizeof($status[$inst]['smscs']); $i++) {
            clean_branch($status[$inst]['smscs'][$i], '');
        }
        /* get the status of this bearerbox */
        list($st, $started, $uptime) = parse_uptime($status[$inst]['status']);
        /* get the info of this bearerbox into a button, to save some screen real-estate*/
        $ver = preg_replace("/\n+/", '\\n', $status[$inst]['version']);
        $ver = preg_replace("/[\\'\\`]/", "\\'", $ver);
        $ver = 'Url: ' . $config["base_url"] . '\\n\\n' . $ver;
        $boxstatus = array('name' => '<a class="href" style="color: green; font-weight: bold" href="#" onClick="alert(\'' . $ver . '\'); return false;">' . $config['name'] . '</a>', 'bgcolor' => 'green', 'status' => $st, 'started' => $started, 'uptime' => $uptime);
    } else {
        $boxstatus = array('name' => $config['name'], 'bgcolor' => 'red', 'status' => 'error', 'started' => '-', 'uptime' => '-');
    }
    ?>
    <tr class="<?php