Jump to content

bass

Members
  • Posts

    240
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by bass

  1. I found only XML pilot status.
    Started to do code for a website that displayed a "passport pilot to vatsim"
    This is what I get:

    • (pilot name)
    • ( surname )
    • Pilot/Observer - rating
    • 2013-05-05 12:48:16 -  date of registration in vatsim
    • P0 -  the designation of the rating
    • UA -  country
    • Europe -  region
    • Russia -  division
    • 0 - ATC  time
    • 283.551 -  flight hours

    2017-03-06_173254.jpg

  2. 4 hours ago, Omerr01 said:

    Hello everyone, 

    I don't know if this is the right place to write this, 

    I want to show in my virtual airline the current deprture board in the real world. 

    If anyone knows Departure board API (FREE) please let me know. 

     

    Thanks, 

    Omer Cohen.

    There is a module (API phpvms) but I was not able to get to work on the site.
    Nopishite may TOM respond.

     

  3. On 18.02.2017 at 0:45 PM, Tom said:

    You'll need to add the header "Authorization" with the value "Basic dXNlcm5hbWU6cGFzc3dvcmQ=", where dXNlcm5hbWU6cGFzc3dvcmQ= is base64_encode($username.':'.$password)

    Hi.
    I was never able to get anything via the API
    TOM you can do one page with code (example) how to request a list of pilots and bring to the page?

  4. 14 hours ago, Tom said:

    @bass Can you give any more information than "does not work"?

    What response do you get?

     

    Don't forget to set the 'Authorization' header.

    The answer I have just the number "1"

    You can show an example of an authorization code that must be on the pages?

  5. 12 hours ago, Tom said:

    In its current state the API requires basic auth user credentials set in the Authorization header for every request. Also unless you've set up URL redirects you'll need to access it via "site.com/action.php/api/..."

    I want to get through the API
    pireps/view
    shedules
    pilots
    The statistics of the company.

    I tried a request in this form: (does not work)

    
    <?php
      $a = trim(strip_tags($_GET["a"]));
    ?>
    
    <?php
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "http://my.site.ru/action.php/api/pilots/$a");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($ch, CURLOPT_HEADER, FALSE);
    $response = curl_exec($ch);
    curl_close($ch);
    $json=json_decode($response,true);
    echo'<pre>',print_r($json),'</pre>'; 
    ?>

     

  6. On 09.02.2017 at 8:56 PM, Tom said:

    The endpoints are documented in the readme on GitHub - they're mostly GET requests so very simple. How you make those GET requests depends on what you're doing (i.e. from Javascript, or an app, etc.) but you can find tons of tutorials on making HTTP requests online.

     

    Hi, trying to get the data from database through your module, but I can't.

    Make a request like this:

    my.site.ru/index.php/api/pilots      not working

    my.site.ru/api/pilots                        not working

    <?php
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "http://my.site.ru/api/pilots");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($ch, CURLOPT_HEADER, FALSE);
    $response = curl_exec($ch);
    curl_close($ch);
    $json=json_decode($response,true);
    echo'<pre>',print_r($json),'</pre>'; 
    ?>

     

  7. There is a link to the data API Vatsim and I will.

    19 minutes ago, lapw123 said:

    Found an atc booking file xml api file but how can i filter the info into boxses there it say name vatsim id etc here is the file just change the file into what ever FIR you want

     

  8. Help bring the search form airports in frontpage_main

    I put this code, but the data from the database are not displayed.

    <select type="text" name="a" class="input-text full-width" placeholder="Введите код годода отправления" />
    	 <option value="">&#1048;&#1050;&#1040;&#1054; &#1074;&#1099;&#1083;&#1077;&#1090;&#1072;</option>
            <?php
    		if(!$depairports) $depairports = array();
    			foreach($depairports as $airport)
    			{
    				echo '<option value="'.$airport->icao.'">'.$airport->icao
    						.' ('.$airport->name.')</option>';
    			}
    		?>
            </select>

     

  9. A small Supplement.
    Now also shows online vatsim ATC at airports .

    2017-01-18_201641.jpg

     

    <div class="col-md-3">
    <div class="panel panel-primary">
     <div class="panel-heading"> 
     <h3 class="panel-title">ATC в сети</h3> </div> 
    <div class="panel-body">
     <?php
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "http://api.vateud.net/online/atc/$name->icao.json");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($ch, CURLOPT_HEADER, FALSE);
    $response = curl_exec($ch);
    curl_close($ch);
    $json=json_decode($response,true); 
    ?>
    
    <?php 
    foreach($json as $row)
    {  
     ?>
      <tr>
        <td><?php echo $row['callsign'];?></td><br>
        <td><?php echo $row['frequency'];?></td><br>
        <td><?php echo $row['name'];?></td><br>
      </tr>
      <hr>
    <?php
    }
    ?>
    
    </div></div></div>

    in airport_info.tpl

     

  10. <?php $cidvatsim = PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?>
    <?php
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "http://api.vateud.net/members/id/$cidvatsim.json");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($ch, CURLOPT_HEADER, FALSE);
    $response = curl_exec($ch);
    curl_close($ch);
    $json=json_decode($response,true);
    ?>
    
    <div id="vf">
    <ul class="blocklist">
      <li>Дивизион : <?php echo $json['division']; ?></li>
      <li>Ранг Vatsim : <?php echo $json['humanized_pilot_rating']; ?></li>
      <li>Регион : <?php echo $json['region']; ?></li>
      <li>country : <?php echo $json['country']; ?></li>
    </ul>

     

  11. I tried to put this code in the query, but it doesn't work(

    <?php
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "http://api.vateud.net/members/id/$userinfo->cid.json");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    ---------------------------------------------------
    
    
    "http://api.vateud.net/members/id/$userinfo->cid.json"
    
    $userinfo->cid = <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?>
    

    <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?>

  12. a small code that displays information on the VATSIM pilot
    in order to work the script I made in the database phpvms_pilots column "CID" and put in his ID number vatsim pilots.

    2017-01-17_232609.jpg

     

    <div class="col col_5_of_12">
    <div class="panel panel-primary">
    <div class="panel-heading">
    <h3 class="panel-title"><i class="fa fa-wifi" aria-hidden="true"></i> Vatsim Pilot </h3>
    </div>
    <div class="panel-body">
    <?php
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "http://api.vateud.net/members/id/$userinfo->cid.json");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($ch, CURLOPT_HEADER, FALSE);
    $response = curl_exec($ch);
    curl_close($ch);
    $json=json_decode($response,true);
    ?>
    
    <div id="vf">
    <ul class="blocklist">
      <li>Дивизион : <?php echo $json['division']; ?></li>
      <li>Ранг Vatsim : <?php echo $json['humanized_pilot_rating']; ?></li>
      <li>Регион : <?php echo $json['region']; ?></li>
      <li>country : <?php echo $json['country']; ?></li>
    </ul>
    </div>
    </div>
    </div>                        
    </div>

     

  13. $start = $pirep->log;
    
    <!-- Огни, минус 5% -->
    $string1 = strstr($start, 'Landing Lights OFF');
    $string2 = substr($string1, 21, 6);
    //echo $string2;
    if($string2 >= '-10000'){
    
    $lights = '5';	
    	
    echo "Landing lights are not turned off when you climb from 5000 ft. up to 10,000 ft.:  -5%";
    }	

    That's not a big sample code that simply displays a violation, but does not save.

  14. I have such code, which considers an overall assessment of the flight.

    Speed exceeding
    Speed below 10,000 FT
    Landing lights
    The rate of descent
    The stall
    Take-off and landing in complicated meteorological conditions
    The angle at take-off
    Crash
    The impact of the nose landing gear
    and so on...

    Here is an example

    2017-01-10_105035.jpg

    All assessments are stored in the database and it shows the TOP pilot for the month.

    2017-01-10_105750.jpg

    • Like 1
×
×
  • Create New...