本文整理汇总了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 '}';
示例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\\" />';
示例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 '}';
示例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\\">';