• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getResults函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: isIndexed

function isIndexed($t)
{
    $query = $t->getText() . " site:wikihow.com";
    $url = "http://www.google.com/search?q=" . urlencode($query) . "&num=100";
    #echo "using {$t->getText()} - $url\n";
    $results = getResults($url);
    if ($results == null) {
        return null;
    }
    $doc = new DOMDocument('1.0', 'utf-8');
    $doc->formatOutput = true;
    $doc->strictErrorChecking = false;
    $doc->recover = true;
    @$doc->loadHTML($results);
    $xpath = new DOMXPath($doc);
    $nodes = $xpath->query('//a[contains(concat(" ", normalize-space(@class), " "), " l")]');
    $index = 1;
    $turl = urldecode($t->getFullURL());
    foreach ($nodes as $node) {
        $href = $node->getAttribute("href");
        #echo "{$title->getFullURL()}, {$href}\n";
        #if (preg_match("@/url?q=" . $title->getFullURL() . "@", $href))
        if ($href == $turl) {
            $found[] = $title;
            return $index;
        }
        $index++;
    }
    return 0;
}
开发者ID:biribogos,项目名称:wikihow-src,代码行数:30,代码来源:checkGoogleIndex.php


示例2: displaySearchResults

function displaySearchResults()
{
    if (isset($_GET["auto"])) {
        return outputResults(getResults(generateAutoSearchUrl()));
    } else {
        return outputResults(getResults(getSearchRequest()));
    }
}
开发者ID:resales-online,项目名称:webkit,代码行数:8,代码来源:incSearchResults.php


示例3: getExport

function getExport()
{
    $results = getResults();
    if (isset($_GET['type']) && $_GET['type'] == VCAL) {
        return new VCalExport($results);
    } else {
        return new ICalExport($results);
    }
}
开发者ID:razagilani,项目名称:srrs,代码行数:9,代码来源:ical.php


示例4: getPageViews

function getPageViews($slug)
{
    global $analytics, $profile;
    $results = getResults($analytics, $profile, $slug);
    if (count($results->getRows()) < 1) {
        return;
    }
    $profileName = $results->getProfileInfo()->getProfileName();
    $rows = $results->getRows();
    $views = $rows[0][1];
    return $views;
}
开发者ID:jennschiffer,项目名称:flannelytics,代码行数:12,代码来源:flannelytics.php


示例5: runMainDemo

function runMainDemo(&$analytics)
{
    try {
        // Step 2. Get the user's first view (profile) ID.
        $profileId = GOOGLE_ANALYTICS_PROFILE_ID;
        if (isset($profileId)) {
            // Step 3. Query the Core Reporting API.
            $results = getResults($analytics, $profileId);
            // Step 4. Output the results.
            printResults($results);
        }
    } catch (apiServiceException $e) {
        // Error from the API.
        print 'There was an API error : ' . $e->getCode() . ' : ' . $e->getMessage();
    } catch (Exception $e) {
        print 'There was a general error : ' . $e->getMessage();
    }
}
开发者ID:ryansholin,项目名称:slack-analytics,代码行数:18,代码来源:analytics.php


示例6: search

function search($title, $site = "")
{
    global $notfound, $found;
    #$urls = split("\n", $q);
    $query = $title->getText() . " {$site}";
    $url = "http://www.google.com/search?q=" . urlencode($query) . "&num=100";
    $results = getResults($url);
    if ($results == null) {
        return -2;
    }
    $doc = new DOMDocument('1.0', 'utf-8');
    $doc->formatOutput = true;
    $doc->strictErrorChecking = false;
    $doc->recover = true;
    @$doc->loadHTML($results);
    $xpath = new DOMXPath($doc);
    $nodes = $xpath->query("//div[@class='vresult']");
    $index = 1;
    $turl = "http://www.wikihow.com/" . urldecode($title->getPrefixedURL());
    foreach ($nodes as $node) {
        $links = $xpath->query(".//a[@class='l']", $node);
        foreach ($links as $link) {
            $href = $link->getAttribute("href");
            #echo "$href\n";
            #echo "+++{$doc->saveXML($link)}\n";
            if ($href == $turl) {
                $found[] = $title;
                return $index;
            }
            $index++;
        }
    }
    #echo str_replace("<", "\n<", $doc->saveXML()); exit;
    $notfound[] = $title;
    return -1;
}
开发者ID:biribogos,项目名称:wikihow-src,代码行数:36,代码来源:checkvideourls.php


示例7: date

$current_time = date("Y-m-d H:i:s", time());
printf("\ncurrent time: %s. script for: %s\n", $current_time, $yesterday);
$dbconnection = new mysqlconnect();
$dbconnection->connect($dbName);
$mysqli = $dbconnection->connection;
$insertquery = "insert into mz_sessioncount(record_date, metric) values (?, ?) on duplicate key update \n    record_date=values(record_date), metric=values(metric)";
if ($stmt = $mysqli->prepare($insertquery)) {
    $stmt->bind_param("si", $datetime, $metric);
    $mysqli->query("start");
} else {
    printf("error: %s\n", $mysqli->error);
}
$analytics = getService();
//$profile = getFirstProfileId($analytics);
$profile = '8515';
$sessioncount = getResults($analytics, $profile);
if (count($sessioncount->getRows()) > 0) {
    $rowCount = count($sessioncount->getRows());
    $rows = $sessioncount->getRows();
    //print_r($rows);
    for ($i = 0; $i < $rowCount; $i++) {
        $datetime = date('Y-m-d', strtotime($rows[$i][0]));
        $metric = $rows[$i][1];
        $stmt->execute();
        printf("date: %s, counts: %d.\n", $datetime, $metric);
    }
}
$stmt->close();
$mysqli->query("done");
$dbconnection->dbclose();
function getService()
开发者ID:noelleli,项目名称:documentation,代码行数:31,代码来源:sessions_lt2.php


示例8: getExpert

<?php

if (isset($_GET["expert"])) {
    $expertName = $_GET["expert"];
    $expert = getExpert($expertName);
    $expert = $expert->speaker;
} else {
    $experts = array();
    $currPage = isset($_GET["p"]) ? $_GET["p"] : 1;
    $keyword = isset($_GET["q"]) ? $_GET["q"] : "";
    $availability = isset($_GET["a"]) ? $_GET["a"] : "";
    $industry = isset($_GET["i"]) ? $_GET["i"] : "";
    $sort = isset($_GET["s"]) ? $_GET["s"] : "name";
    $pagesize = isset($_GET["n"]) ? $_GET["n"] : 10;
    $responseData = getResults($currPage, $keyword, $availability, $industry, $sort, $pagesize);
    $filters = getFilter($currPage, $keyword, $availability, $industry, $sort, $pagesize);
    $pagination = buildPagination($currPage, $responseData->total, $pagesize);
    $searchDetail = getSearchInfo($currPage, $responseData->total, $pagesize);
    $filterArray = array();
    if ($sort !== 'name') {
        $filterArray[] = 's=' . $sort;
    }
    if ($pagesize !== 10) {
        $filterArray[] = 'n=' . $pagesize;
    }
    if (!empty($filterArray)) {
        $filterString = implode('&', $filterArray);
    }
    $filter_availability = $availability;
    $filter_industry = $industry;
    $filter_keyword = $keyword;
开发者ID:wosevision,项目名称:expert-centre,代码行数:31,代码来源:_controller.php


示例9: getResults

function getResults(&$analytics, $profileId)
{
    // Calls the Core Reporting API and queries for the number of sessions
    // for the last seven days.
    return $analytics->data_ga->get('ga:' . $profileId, '7daysAgo', 'today', 'ga:sessions');
}
/*function printResults(&$results) {
  // Parses the response from the Core Reporting API and prints
  // the profile name and total sessions.
  if (count($results->getRows()) > 0) {

    // Get the profile name.
    $profileName = $results->getProfileInfo()->getProfileName();

    // Get the entry for the first entry in the first row.
    $rows = $results->getRows();
    $sessions = $rows[0][0];

    // Print the results.
    print "First view (profile) found: $profileName\n";
    print "Total sessions: $sessions\n";
  } else {
    print "No results found.\n";
  }
}
*/
$analytics = getService();
//$profile = getFirstProfileId($analytics);
$profile = '8515';
$outcome = getResults($analytics, $profile);
var_dump($outcome);
开发者ID:noelleli,项目名称:documentation,代码行数:31,代码来源:GA_functions.php


示例10: aeg

<br><br>
  	<input type="submit" name="create" value="Salvesta">
  </form>
 <br><br>
 <h3>Eelnevad jooksud:</h3>
 <table border=1 >
<tr>
	<th>id</th>
	<th>kasutaja id</th>
	<th>Jooksu pikkus</th>
	<th>Jooksu aeg(H)</th>
	<th>Rada</th>
	<th>Kuupäev</th>
</tr>
 <?php 
$result_list = getResults();
?>
 
<?php 
// iga massiivis olema elemendi kohta
// count($car_list) - massiivi pikkus
for ($i = 0; $i < count($result_list); $i++) {
    // $i = $i +1; sama mis $i += 1; sama mis $i++;
    //kui on see rida mida kasutaja tahab muuta siis kuvan input väljad
    if (isset($_GET["edit"]) && $result_list[$i]->id == $_GET["edit"]) {
        // kasutajale muutmiseks
        echo "<tr>";
        echo "<form action='table.php' method='post'>";
        echo "<td>" . $result_list[$i]->id . "</td>";
        echo "<td>" . $result_list[$i]->user_id . "</td>";
        echo "<td><input name='time' value='" . $result_list[$i]->time . "'></td>";
开发者ID:TaunoLainevool,项目名称:3.kodutoo-II-ruhm,代码行数:31,代码来源:data.php


示例11: json_decode

        // if authenticated, get users list of access groups
        $_SESSION['loggedIn'] = "Y";
        // login user
        $_SESSION['username'] = $data['username'];
        $_SESSION['userGroups'] = json_decode($userGroups);
    }
    return $auth;
}
function logout()
{
    session_destroy();
    return true;
}
if ($call == 'getResults') {
    // adaptor to run corresponding functions
    print_r(getResults($data));
} else {
    if ($call == 'getMetadataFieldList') {
        print_r(getMetadataFieldList());
    } else {
        if ($call == 'getAclList') {
            print_r(getAclList($data));
        } else {
            if ($call == 'login') {
                print_r(login($data));
            } else {
                if ($call == 'logout') {
                    print_r(logout());
                } else {
                    if ($call == 'checkLogin') {
                        print_r(checkLogin());
开发者ID:kidaak,项目名称:airavata-sandbox,代码行数:31,代码来源:dataStoreService.php


示例12: google_login

 public function google_login()
 {
     require_once APPPATH . 'libraries/google-api-php-client/src/Google/autoload.php';
     //$this->load->model('users_model');
     //$redirect = isEmpty($this->input->get('referuri'))?'':$this->input->get('referuri');
     $data = array();
     //echo 'test';
     // Start a session to persist credentials.
     //session_start();
     //echo BASEPATH;
     //var_dump(is_file(APPPATH.'libraries/google-api-php-client/client_secrets.json'));
     //exit('test');
     // Create the client object and set the authorization configuration
     // from the client_secrets.json you downloaded from the Developers Console.
     $client = new Google_Client();
     $client->setAuthConfigFile(APPPATH . 'libraries/google-api-php-client/client_secrets.json');
     //$client->setRedirectUri(base_url('login/google_callback'));
     $client->setScopes('email');
     $client->addScope(Google_Service_Analytics::ANALYTICS_READONLY);
     // If the user has already authorized this app then get an access token
     // else redirect to ask the user to authorize access to Google Analytics.
     if ($this->session->userdata('access_token') != '') {
         // Set the access token on the client.
         $client->setAccessToken($this->session->userdata('access_token'));
         // Create an authorized analytics service object.
         $analytics = new Google_Service_Analytics($client);
         // Get the first view (profile) id for the authorized user.
         $profile = getFirstProfileId($analytics);
         // Get the results from the Core Reporting API and print the results.
         printResults(getResults($analytics, $profile));
     } else {
         $redirect_uri = base_url('login/google_callback');
         //header('Location: ' . filter_var($redirect_uri, FILTER_SANITIZE_URL));
         redirect(filter_var($redirect_uri, FILTER_SANITIZE_URL));
     }
 }
开发者ID:achmun,项目名称:mybackend,代码行数:36,代码来源:login.php


示例13: action_user_login

 public function action_user_login($nationalId, $password)
 {
     $users = getResults(DB::query('select * from users where national_id = ? and upassword = ?', array($nationalId, $password)));
     if (count($users) == 1) {
         return response(array('user' => $users, 'operation' => 'login'));
     }
     return response(array('user' => array(), 'operation' => 'login'));
 }
开发者ID:nournia,项目名称:ketabkhaane-server,代码行数:8,代码来源:data.php


示例14: date

$profile = $gaprofile::makezine;
$today = date("Y-m-d", time());
$dbconnection = new mysqlconnect();
$dbconnection->connect($dbName);
$mysqli = $dbconnection->connection;
$insertquery = "insert into mz_pv(statdate, pageviews, sessions, users, newusers) values (?,?,?,?,?)";
if ($stmt = $mysqli->prepare($insertquery)) {
    $stmt->bind_param("siiii", $statdate, $pageviews, $sessions, $users, $newusers);
    $mysqli->query("start");
} else {
    printf("error: %s\n", $mysqli->error);
}
$analytics = getService();
//$profile = getFirstProfileId($analytics);
$profile = '8515';
$mzmetrics = getResults($analytics, $profile);
if (count($mzmetrics->getRows()) > 0) {
    $rowCount = count($mzmetrics->getRows());
    $rows = $mzmetrics->getRows();
    //print_r($rows);
    for ($i = 0; $i < $rowCount; $i++) {
        $statdate = date('Y-m-d', strtotime($rows[$i][0]));
        $pageviews = $rows[$i][1];
        $sessions = $rows[$i][2];
        $users = $rows[$i][3];
        $newusers = $rows[$i][4];
        $stmt->execute();
        printf("date: %s, pageviews: %d.\n", $statdate, $pageviews);
    }
}
$stmt->close();
开发者ID:noelleli,项目名称:documentation,代码行数:31,代码来源:GA_KPIV2.php


示例15: error_reporting

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>测试curl</title>
</head>
<body>
<?php 
error_reporting(E_ALL && ~E_NOTICE);
//获取图片数据
$url = "http://api.hdtv.letv.com/iptv/api/box/getNavigator.json?type=1";
$datas = getResults($url);
$response = $datas['response'];
$response = array_reverse($response);
echo "<pre>";
print_r($response);
echo "</pre>";
function getResults($url)
{
    $return = '';
    if ($url) {
        //初始化一个对象
        $curl = curl_init();
        //设置要抓取的url
        curl_setopt($curl, CURLOPT_URL, $url);
        //设置header
        //curl_setopt($curl,CURLOPT_HEADER,1);
        //设置cURL 参数,要求结果保存到字符串中还是输出到屏幕上。
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
        //设置超时时间只需要设置一个秒的数量就可以
        curl_setopt($ch, CURLOPT_TIMEOUT, 20);
开发者ID:20000Hz,项目名称:bak-letvs,代码行数:31,代码来源:ceshiurl.php


示例16: getResults

</head>
<body>
  <div class="container">

    <h1>All Results</h1>

    <table class="table table-striped table-bordered table-hover">
      <tr>
        <th>id</th>
        <th>name</th>
        <th>email</th>
        <th>time</th>
        <th>detail</th>
      </tr>
      <?php 
$entries = getResults($conn);
for ($i = 0; $i < count($entries); $i++) {
    $entry = $entries[$i];
    echo "<tr>";
    echo "<td>{$entry['id']}</td>";
    echo "<td>{$entry['key_name']}</td>";
    echo "<td>{$entry['key_email']}</td>";
    echo "<td>{$entry['created_at']}</td>";
    echo "<td><a href='q_result.php?id={$entry['id']}'>detail</a></td>";
    echo "</tr>";
}
?>
    </table>

    <br/>
开发者ID:puuga,项目名称:health_project-2015,代码行数:30,代码来源:all_results.php


示例17: foreach

        $total_results = $results->PaginationResult->TotalNumberOfEntries;
        echo "<b>{$total_results} results</b><br/><br/>";
        if ($total_results) {
            foreach ($results->SearchResultItemArray as $search_result_items) {
                foreach ($search_result_items as $search_result_item) {
                    echo '<table border="1">';
                    foreach ($search_result_item->Item as $name => $value) {
                        echo "<tr><td>{$name}</td><td>";
                        print_r($value);
                        echo "</td></tr>";
                    }
                    echo '</table></br>';
                }
            }
        }
    } catch (Exception $e) {
        echo '<b>Exception: </b>' . $e->getMessage();
    }
}
?>

<form action="eBayClient.php" method="POST">
    <b>Query: </b>
    <input name="query"/>
    <input type="submit" name="submitquery" value="Submit Query">
</form>

<?php 
if (array_key_exists('query', $_POST)) {
    getResults($_POST['query']);
}
开发者ID:psagi,项目名称:sdo,代码行数:31,代码来源:eBayClient2.php


示例18: foreach




$completed_courses=getCompletedCourses();
//$students=getStudentsByCourse("3");
//$grades=getGrades($students,"3");
//$data= render($grades);
//var_dump($data);
//$result.=$data;
//$result.="</tbody></table>";
//sendCustomMail($teacher_email ,$result);

foreach($completed_courses as $course)
{
$course_id= $course->course;

$teacher_email= getTeachersByCourse($course_id);
$students=getStudentsByCourse($course_id);
$grades=getGrades($students,$courseId);
$data= render($grades);
//var_dump($data);
$result.=$data;
$result.="</tbody></table>";
sendCustomMail($teacher_email ,$result);

}
}

getResults();
?>
开发者ID:kmahesh541,项目名称:mitclone,代码行数:27,代码来源:teacher_reports.php


示例19: curl_init

    $ch = curl_init("https://public-api.expertfile.com/v1/" . ID . "/accessToken?oauth_consumer_key=" . $consumer_key . "&oauth_consumer_secret=" . $consumer_secret . "&request_uri=" . $req_url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $responsefromwcf = curl_exec($ch);
    curl_close($ch);
    $responseData = json_decode($responsefromwcf);
    if ($responseData->success) {
        return $responseData->data->authorization;
    } else {
        return $responseData->msg;
    }
}
function getResults()
{
    $consumer_key = KEY;
    $consumer_secret = SECRET;
    $req_url = 'https://public-api.expertfile.com/v1/organization/' . ID . '/search';
    $oauth = getAccessToken($consumer_key, $consumer_secret, $req_url);
    $parameters = array('fields' => urlencode('user:firstname,user:lastname,user:job_title,tagline,user:location:city,user:location:state,user:location:country'), 'keywords' => urlencode(''), 'location' => urlencode(''), 'industry' => urlencode(''), 'portfolio' => urlencode(''), 'availability' => urlencode(''), 'fee_min' => urlencode(''), 'fee_max' => urlencode(''), 'page_number' => urlencode(1), 'page_size' => 99999, 'keyword' => urlencode(''));
    $req_url = $req_url;
    $params = http_build_query($oauth) . '&' . http_build_query($parameters);
    $ch = curl_init($req_url . '?' . $params);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $responsefromwcf = curl_exec($ch);
    curl_close($ch);
    $responseData = json_decode($responsefromwcf);
    return $responseData;
}
$responseData = getResults($currPage, $keyword, $availability, $industry);
if ($responseData->success) {
    echo json_encode($responseData->speakers);
}
开发者ID:wosevision,项目名称:expert-centre,代码行数:31,代码来源:search.php


示例20: setStockChange

for ($i = 0; $i < 35; $i++) {
    $stock = $phpObj->{'list'}->{'resources'}[$i]->{'resource'}->{'fields'};
    echo "<span style='color:white'>" . $stock->{'symbol'} . "</span>";
    echo setStockChange($stock->{'change'});
}
curl_close($session);
?>
						</h3>
					</div>
					
					<hr>
                    <p>
                        <ul class="list-group">
                            <?php 
$url = "https://feeds.finance.yahoo.com/rss/2.0/headline?s=aapl,bac,cvs,cat,rmax,wmt,t,cmc,so,mmp&region=US&lang=en-US";
$rssOutput = getResults($url);
$results = $rssOutput->channel;
$count = 0;
while ($count < count($results->item)) {
    $title = $results->item[$count]->title;
    $link = $results->item[$count]->link;
    echo "<li class='list-group-item'><a href='" . $link . "'>" . $title . "</a></li>";
    $count++;
}
function getResults($url)
{
    $rssOutput = simplexml_load_string(file_get_contents($url));
    return $rssOutput;
}
?>
                        </table>
开发者ID:jtaylor32,项目名称:smipo,代码行数:31,代码来源:index.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getReturnTo函数代码示例发布时间:2022-05-15
下一篇:
PHP getResultUi函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap