当前位置: 首页>>代码示例>>PHP>>正文


PHP processOpenSRS函数代码示例

本文整理汇总了PHP中processOpenSRS函数的典型用法代码示例。如果您正苦于以下问题:PHP processOpenSRS函数的具体用法?PHP processOpenSRS怎么用?PHP processOpenSRS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了processOpenSRS函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dirname

if (isset($_POST['function'])) {
    require_once dirname(__FILE__) . '/../..//opensrs/openSRS_loader.php';
    // Form data capture
    $formFormat = $_POST['format'];
    // Put the data to the Formatted array
    $callstring = '';
    $callArray = array('func' => $_POST['function'], 'data' => array('cookie' => $_POST['cookie'], 'domain' => $_POST['domain'], 'reg_password' => $_POST['reg_password']));
    if ($formFormat == 'json') {
        $callstring = json_encode($callArray);
    }
    if ($formFormat == 'yaml') {
        $callstring = Spyc::YAMLDump($callArray);
    }
    // Open SRS Call -> Result
    $osrsHandler = processOpenSRS($formFormat, $callstring);
    // Print out the results
    echo ' In: ' . $callstring . '<br>';
    echo 'Out: ' . $osrsHandler->resultFullFormatted;
} else {
    // Format
    if (isset($_GET['format'])) {
        $tf = $_GET['format'];
    } else {
        $tf = 'json';
    }
    ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
开发者ID:opensrs,项目名称:osrs-toolkit-php,代码行数:30,代码来源:test-authChangePassword.php

示例2: trim

<?php

if (isset($_POST['function'])) {
    require_once '../opensrs/openSRS_loader.php';
    $callstring = '';
    $firstname = trim($_POST['firstname']);
    $lastname = trim($_POST['lastname']);
    $searchstring = $firstname . ' ' . $lastname;
    $callArray = array('func' => $_POST['function'], 'data' => array('searchstring' => $searchstring));
    $callstring = json_encode($callArray);
    // Open SRS Call -> Result
    $osrsHandler = processOpenSRS('json', $callstring);
    $json_out = $osrsHandler->resultFormatted;
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us" >
<head>
	<link rel="stylesheet" href="css/template.css" type="text/css" />
	<link rel="stylesheet" href="css/template-about.css" type="text/css" />

  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
	<script language="Javascript" type="text/javascript" src="js/runonload.js"></script>
	<script language="Javascript" type="text/javascript" src="js/democode.js"></script>	

	
	<style media="screen" type="text/css">
	.defaultText { width: 205px; height: 39px; font-size: 20px;}
	.defaultTextActive { color: #a1a1a1; font-style: italic;}
	input.headerboxNameSuggest {
开发者ID:opensrs,项目名称:osrs-toolkit-php,代码行数:31,代码来源:demo6.php

示例3: trim

<?php

if (isset($_POST['function'])) {
    require_once "../opensrs/spyc.php";
    $callstring = "";
    $firstname = trim($_POST["firstname"]);
    $lastname = trim($_POST["lastname"]);
    $searchstring = $firstname . " " . $lastname;
    $callArray = array("func" => $_POST["function"], "data" => array("searchstring" => $searchstring));
    $callstring = json_encode($callArray);
    // Open SRS Call -> Result
    require_once "../opensrs/openSRS_loader.php";
    $osrsHandler = processOpenSRS("json", $callstring);
    $json_out = $osrsHandler->resultFormatted;
    if (isset($json_out)) {
        echo '<table>';
        $json_a = json_decode($json_out, true);
        $counter = 0;
        foreach ($json_a[suggestion][items] as $item) {
            if ($item[status] == "available") {
                $domain = preg_replace("/\\./", "@", $item[domain], 1);
                if ($counter == 0) {
                    echo '<p id="available"><strong>' . $domain . '</strong> is available.</p>';
                    echo '<h2>Available Email Addresses</h2>';
                }
                $temp = $counter % 2 + 1;
                echo '<tr class="listLine' . $temp . '";"><td>' . $domain . '</td><td>' . $item[status] . '</td></tr>';
                $counter++;
            }
            if ($counter == 20) {
                break;
开发者ID:trilopin,项目名称:osrs-toolkit-php,代码行数:31,代码来源:demo6p.php

示例4: opensrspro_viewdomainnotes

function opensrspro_viewdomainnotes($params)
{
    global $osrsError;
    global $osrsLogError;
    $domain = $params['sld'] . '.' . $params['tld'];
    $params = array_merge($params, getConfigurationParamsData());
    $command = 'getadmindetails';
    $adminuser = '';
    $values = '';
    $results = localAPI($command, $values, $adminuser);
    $callArray = array('func' => 'viewDomainNotes', 'data' => array('domain' => $domain), 'connect' => generateConnectData($params));
    $result = "";
    $openSRSHandler = processOpenSRS("array", $callArray);
    $result = '<table cellspacing="1" cellpadding="3" width="100%" border="0" class="datatable"><tbody>';
    $result .= '<th>Notes</th>';
    $result .= '<th>Date</th>';
    foreach ($openSRSHandler->resultFullRaw['attributes']['notes'] as $notesData) {
        $result .= '<tr>';
        $result .= '<td>' . $notesData['note'] . '</td>';
        $result .= '<td width=18%>' . $notesData['timestamp'] . '</td>';
        $result .= '</tr>';
    }
    $result .= '</tbody><table>';
    echo $result;
    exit;
}
开发者ID:carriercomm,项目名称:WHMCS-OpenSRSPro-Module,代码行数:26,代码来源:opensrspro.php


注:本文中的processOpenSRS函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。