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


PHP Spotter::getRealTimeData方法代码示例

本文整理汇总了PHP中Spotter::getRealTimeData方法的典型用法代码示例。如果您正苦于以下问题:PHP Spotter::getRealTimeData方法的具体用法?PHP Spotter::getRealTimeData怎么用?PHP Spotter::getRealTimeData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Spotter的用法示例。


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

示例1: Spotter

<?php

require 'require/class.Connection.php';
require 'require/class.Spotter.php';
header('Content-Type: text/javascript');
$Spotter = new Spotter();
$spotter_array = $Spotter->getRealTimeData();
print '{';
print '"airline_logo": "';
if (@getimagesize('http://www.barriespotter.com/images/airlines/' . $spotter_array[0]['airline_icao'] . '.png')) {
    print 'http://www.barriespotter.com/images/airlines/' . $spotter_array[0]['airline_icao'] . '.png';
}
print '",';
print '"body": "' . $spotter_array[0]['ident'] . ' - ' . $spotter_array[0]['airline_name'] . ' | ' . $spotter_array[0]['aircraft_name'] . ' (' . $spotter_array[0]['aircraft_type'] . ') | ' . $spotter_array[0]['departure_airport'] . ' - ' . $spotter_array[0]['arrival_airport'] . '",';
print '"url": "http://www.barriespotter.com/flightid/' . $spotter_array[0]['spotter_id'] . '",';
print '"html": "';
if (!empty($spotter_array)) {
    print '<a href=\\"http://www.barriespotter.com/flightid/' . $spotter_array[0]['spotter_id'] . '\\">';
    if (@getimagesize('http://www.barriespotter.com/images/airlines/' . $spotter_array[0]['airline_icao'] . '.png')) {
        print '<img src=\\"http://www.barriespotter.com/images/airlines/' . $spotter_array[0]['airline_icao'] . '.png\\" width=\\"50px\\" /> ';
    }
    print $spotter_array[0]['ident'] . ' - ' . $spotter_array[0]['airline_name'] . ' | ' . $spotter_array[0]['aircraft_name'] . ' (' . $spotter_array[0]['aircraft_type'] . ') | ' . $spotter_array[0]['departure_airport'] . ' - ' . $spotter_array[0]['arrival_airport'] . '</a>';
}
print '"';
print '}';
开发者ID:dedevillela,项目名称:BravoHotelZulu,代码行数:25,代码来源:getLatestData.php

示例2: header

<?php

require 'require/class.Connection.php';
require 'require/class.Spotter.php';
header('Content-Type: text/javascript');
$spotter_array = Spotter::getRealTimeData($_GET['q']);
$output = '{';
$output .= '"flights": [';
foreach ($spotter_array as $spotter_item) {
    $output .= '{';
    $output .= '"flight_id": "' . $spotter_item['spotter_id'] . '",';
    $output .= '"html": "';
    $output .= '<tr id=\\"table-tr-' . $spotter_item['spotter_id'] . '\\" style=\\"display:none;\\">';
    if ($_GET['image'] == "true") {
        if ($spotter_item['image'] != "") {
            $output .= '<td class=\\"aircraft_image\\">';
            $output .= '<img src=\\"' . $spotter_item['image'] . '\\" alt=\\"Click to see more information about this flight\\" title=\\"Click to see more information about this flight\\" />';
            $output .= '</td>';
        } else {
            $output .= '<td class=\\"aircraft_image\\">';
            $output .= '<img src=\\"' . $globalURL . '/images/placeholder.png\\" alt=\\"Click to see more information about this flight\\" title=\\"Click to see more information about this flight\\" />';
            $output .= '</td>';
        }
    }
    if ($globalIVAO && @getimagesize($globalURL . '/images/airlines/' . $spotter_item['airline_icao'] . '.gif')) {
        $output .= '<td class=\\"logo\\">';
        $output .= '<img src=\\"' . $globalURL . '/images/airlines/' . $spotter_item['airline_icao'] . '.gif\\" />';
        $output .= '</td>';
    } elseif (@getimagesize($globalURL . '/images/airlines/' . $spotter_item['airline_icao'] . '.png')) {
        $output .= '<td class=\\"logo\\">';
        $output .= '<img src=\\"' . $globalURL . '/images/airlines/' . $spotter_item['airline_icao'] . '.png\\" />';
开发者ID:hzmarrou,项目名称:FlightAirMap,代码行数:31,代码来源:getLatestData-tv.php

示例3: header

<?php

require 'require/class.Connection.php';
require 'require/class.Spotter.php';
header('Content-Type: text/javascript');
$spotter_array = Spotter::getRealTimeData();
print '{';
print '"airline_logo": "';
if (@getimagesize('http://www.barriespotter.com/images/airlines/' . $spotter_array[0]['airline_icao'] . '.png')) {
    print 'http://www.barriespotter.com/images/airlines/' . $spotter_array[0]['airline_icao'] . '.png';
}
print '",';
print '"body": "' . $spotter_array[0]['ident'] . ' - ' . $spotter_array[0]['airline_name'] . ' | ' . $spotter_array[0]['aircraft_name'] . ' (' . $spotter_array[0]['aircraft_type'] . ') | ' . $spotter_array[0]['departure_airport'] . ' - ' . $spotter_array[0]['arrival_airport'] . '",';
print '"url": "http://www.barriespotter.com/flightid/' . $spotter_array[0]['spotter_id'] . '",';
print '"html": "';
if (!empty($spotter_array)) {
    print '<a href=\\"http://www.barriespotter.com/flightid/' . $spotter_array[0]['spotter_id'] . '\\">';
    if (@getimagesize('http://www.barriespotter.com/images/airlines/' . $spotter_array[0]['airline_icao'] . '.png')) {
        print '<img src=\\"http://www.barriespotter.com/images/airlines/' . $spotter_array[0]['airline_icao'] . '.png\\" width=\\"50px\\" /> ';
    }
    print $spotter_array[0]['ident'] . ' - ' . $spotter_array[0]['airline_name'] . ' | ' . $spotter_array[0]['aircraft_name'] . ' (' . $spotter_array[0]['aircraft_type'] . ') | ' . $spotter_array[0]['departure_airport'] . ' - ' . $spotter_array[0]['arrival_airport'] . '</a>';
}
print '"';
print '}';
开发者ID:hzmarrou,项目名称:FlightAirMap,代码行数:24,代码来源:getLatestData.php

示例4: Spotter

<?php

require 'require/class.Connection.php';
require 'require/class.Spotter.php';
header('Content-Type: text/javascript');
$Spotter = new Spotter();
$spotter_array = $Spotter->getRealTimeData($_GET['q']);
$output = '{';
$output .= '"flights": [';
foreach ($spotter_array as $spotter_item) {
    $output .= '{';
    $output .= '"flight_id": "' . $spotter_item['spotter_id'] . '",';
    $output .= '"html": "';
    $output .= '<tr id=\\"table-tr-' . $spotter_item['spotter_id'] . '\\" style=\\"display:none;\\">';
    if ($_GET['image'] == "true") {
        if ($spotter_item['image'] != "") {
            $output .= '<td class=\\"aircraft_image\\">';
            $output .= '<img src=\\"' . $spotter_item['image'] . '\\" alt=\\"Click to see more information about this flight\\" title=\\"Click to see more information about this flight\\" />';
            $output .= '</td>';
        } else {
            $output .= '<td class=\\"aircraft_image\\">';
            $output .= '<img src=\\"' . $globalURL . '/images/placeholder.png\\" alt=\\"Click to see more information about this flight\\" title=\\"Click to see more information about this flight\\" />';
            $output .= '</td>';
        }
    }
    if ($globalIVAO && @getimagesize($globalURL . '/images/airlines/' . $spotter_item['airline_icao'] . '.gif')) {
        $output .= '<td class=\\"logo\\">';
        $output .= '<img src=\\"' . $globalURL . '/images/airlines/' . $spotter_item['airline_icao'] . '.gif\\" />';
        $output .= '</td>';
    } elseif (@getimagesize($globalURL . '/images/airlines/' . $spotter_item['airline_icao'] . '.png')) {
        $output .= '<td class=\\"logo\\">';
开发者ID:linuxpronl,项目名称:FlightAirMap,代码行数:31,代码来源:getLatestData-tv.php


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