Jump to content

piuozorio

Members
  • Content Count

    38
  • Joined

  • Last visited

Community Reputation

8 Neutral

About piuozorio

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male
  • Location
    LPPT - Portugal

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. piuozorio

    Help with QPX Express API

    Thank you for your reply and help. I know you point me in the right direction but i dont understand arrays or is dificult for me, big arrays or arrays inside arrays. I tested with some examples in that link and changed for my results but nothing show, allways empty. Do you know how to do and post the right code for me? All i found is the request and nothing about the response in separate variables, all stops in echo $result; or var_dump($result); Sorry my english and thank you
  2. piuozorio

    Help with QPX Express API

    Hello, i'm trying to use google flight search api but dont know how to "decode" the result. The search is ok, i'm using this code with (solutions => "1") i put 1 just for tests, but want more <?php $data = array ( "request" => array( "passengers" => array( adultCount => 1 ), "slice" => array( array( origin => "LIS", destination => "OPO", date => "2015-05-09"), ), solutions => "1" ), ); $data_string = json_encode($data);$ch = curl_init('https://www.googleap...ch?key=MyAPIKey'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); $result = curl_exec($ch);curl_close($ch); /* then I echo the result for testing purposes */ echo $result; ?> The echo result show this { "kind": "qpxExpress#tripsSearch", "trips": { "kind": "qpxexpress#tripOptions", "requestId": "0wbdK1I8oibR6DGxe0Lr9f", "data": { "kind": "qpxexpress#data", "airport": [ { "kind": "qpxexpress#airportData", "code": "LIS", "city": "LIS", "name": "Lisbon" }, { "kind": "qpxexpress#airportData", "code": "OPO", "city": "OPO", "name": "Porto Francisco Sa Carneiro" } ], "city": [ { "kind": "qpxexpress#cityData", "code": "LIS", "name": "Lisbon" }, { "kind": "qpxexpress#cityData", "code": "OPO", "name": "Porto" } ], "aircraft": [ { "kind": "qpxexpress#aircraftData", "code": "319", "name": "Airbus A319" } ], "tax": [ { "kind": "qpxexpress#taxData", "id": "YP_003", "name": "Portugal Passenger Service Charge" }, { "kind": "qpxexpress#taxData", "id": "PT_001", "name": "Portugal Security Tax" }, { "kind": "qpxexpress#taxData", "id": "WA_001", "name": "Portugal VAT" }, { "kind": "qpxexpress#taxData", "id": "YQ", "name": "TP YQ surcharge" } ], "carrier": [ { "kind": "qpxexpress#carrierData", "code": "TP", "name": "TAP Portugal" } ] }, "tripOption": [ { "kind": "qpxexpress#tripOption", "saleTotal": "EUR62.72", "id": "6QG2bBg243IUGhiWMnGBu0001", "slice": [ { "kind": "qpxexpress#sliceInfo", "duration": 55, "segment": [ { "kind": "qpxexpress#segmentInfo", "duration": 55, "flight": { "carrier": "TP", "number": "1944" }, "id": "GajwbwJfUhmW4VVm", "cabin": "COACH", "bookingCode": "T", "bookingCodeCount": 9, "marriedSegmentGroup": "0", "leg": [ { "kind": "qpxexpress#legInfo", "id": "LZub2a5ZWG9fzNrA", "aircraft": "319", "arrivalTime": "2015-05-10T00:50+01:00", "departureTime": "2015-05-09T23:55+01:00", "origin": "LIS", "destination": "OPO", "originTerminal": "1", "duration": 55, "mileage": 171, "meal": "Refreshments" } ] } ] } ], "pricing": [ { "kind": "qpxexpress#pricingInfo", "fare": [ { "kind": "qpxexpress#fareInfo", "id": "Apo/c6mAuCr7AQaaRm1wQQ2vypSTnyqzYNW5EG6D196qP", "carrier": "TP", "origin": "LIS", "destination": "OPO", "basisCode": "TFLYOWD" } ], "segmentPricing": [ { "kind": "qpxexpress#segmentPricing", "fareId": "Apo/c6mAuCr7AQaaRm1wQQ2vypSTnyqzYNW5EG6D196qP", "segmentId": "GajwbwJfUhmW4VVm", "freeBaggageOption": [ { "kind": "qpxexpress#freeBaggageAllowance", "bagDescriptor": [ { "kind": "qpxexpress#bagDescriptor", "commercialName": "UPTO50LB 23KG AND62LI 158LCM", "count": 1, "description": [ "Up to 50 lb/23 kg", "Up to 62 li/158 lcm" ], "subcode": "0GO" } ], "pieces": 1 } ] } ], "baseFareTotal": "EUR21.00", "saleFareTotal": "EUR21.00", "saleTaxTotal": "EUR41.72", "saleTotal": "EUR62.72", "passengers": { "kind": "qpxexpress#passengerCounts", "adultCount": 1 }, "tax": [ { "kind": "qpxexpress#taxInfo", "id": "WA_001", "chargeType": "GOVERNMENT", "code": "WA", "country": "PT", "salePrice": "EUR1.26" }, { "kind": "qpxexpress#taxInfo", "id": "PT_001", "chargeType": "GOVERNMENT", "code": "PT", "country": "PT", "salePrice": "EUR4.03" }, { "kind": "qpxexpress#taxInfo", "id": "YP_003", "chargeType": "GOVERNMENT", "code": "YP", "country": "PT", "salePrice": "EUR9.93" }, { "kind": "qpxexpress#taxInfo", "id": "YQ", "chargeType": "CARRIER_SURCHARGE", "code": "YQ", "salePrice": "EUR25.00" }, { "kind": "qpxexpress#taxInfo", "id": "WA_001", "chargeType": "GOVERNMENT", "code": "WA", "country": "PT", "salePrice": "EUR1.50" } ], "fareCalculation": "LIS TP OPO 21.00TFLYOWD EUR 21.00 END XT 4.03PT 2.76WA 9.93YP 25.00YQ", "latestTicketingTime": "2015-04-03T17:19-04:00", "ptc": "ADT" } ] } ] } } 1 Now i want tho "decode" and put the result in variables like foreach ........... $aircraft = ..... //code or name $depicao = .... //get iata $arricao = ...... //get iata and so on Thank you for your help
  3. piuozorio

    What is the latest with the recaptcha?

    Hello, a few days ago i was having problem with my recaptcha in registration, i (think/thought) that was because i moved from http to https and stop working. I made a search and found some links, at least for the registration starts working again. In recaptchalib.php Find this line and //comment: define("RECAPTCHA_API_SECURE_SERVER", "http://api-secure.recaptcha.net"); After add: define("RECAPTCHA_API_SECURE_SERVER", "https://www.google.com/recaptcha/api"); For me it works, hope works for you Sorry my english
  4. piuozorio

    phpvms logs me out, session doesn't stay alive

    Hi, recently i changed my phpvms skin and have the "same" problem, my problem was the "remember me" on login code. If i close the browser the login was lost, then i fix the "remember" part the login keeps alive all the time. Hope that helps
  5. piuozorio

    gzip compression

    Hello all, is possible to compress phpvms with something like this? if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); I have tried but allways get errors and css problems. My homepage(root) isn't phpvms and is compressed, the foruns phpbb3(root/phpbb3) is compressed too. The phpvms is in root/folder/phpvms but can´t compress. To do the tests i used this website http://www.gidnetwor...s/gzip-test.php Anyone ever tried? Thank you
  6. piuozorio

    Java Snow Code

    Hello, here is what i use, simple <script src="http://snow-effect.googlecode.com/files/snow.js" type="text/javascript"></script>
  7. piuozorio

    Maintenance.php Bids removal

    Yes thats it.
  8. piuozorio

    Maintenance.php Bids removal

    Hello again, i forgot to add the other function to work. Add to schedulesData.class.php public function getSchedulesBidsExpired() { $cache_time = Config::Get('BID_EXPIRE_TIME'); if($cache_time == '') { return; } $sql = 'SELECT * FROM '.TABLE_PREFIX."bids WHERE `dateadded` + INTERVAL {$cache_time} HOUR < NOW()"; $row = DB::get_results($sql); return $row; } Hope it works now NOTE: I saw the other thread and is the "same code" all in one I think i have edited the table bids to save date/time, not only date, because if is only date dont work properlly. Lets say you have configured expire after 24 hours You bid at 13:00 30/10/2012 and hope expired at 13:00 31/10/2012 Without the hours in database it expires (start) at 00:00 31/10/2012 and with the date only, yeh 30/10/2012 to 31/10/2012 is 24h so with the hour it calculates well, only after 13:00 31/10/2012 I dont know if you understand what im saying, sorry my english The "eficiência" was created with a help of a friend. Just a php code that reads each line of log when "send pirep" and "before" enter in database. Now in each line , i use this line code http://www.php.net/m...tion.substr.php to get the bold values, [11:43] - Flaps to position 2 at 3169ft, hdg 3 and 200kts It makes the "send pirep" time slower to read all code first and then get the "pirep filed".
  9. piuozorio

    Maintenance.php Bids removal

    Hello all and sorry my english, i think Felipe is right the problem is when cron job do the work is not setting the scheduled bid (bidid) to 0 in schedules table. You can check that, in your table and if is that the problem here is my code so you can try. I´m not a pro coder, just works for me, maybe the function already exists or other faster way so here it is. In your SchedulesData.class.php add the function public function ResetSchedulesBidsExpired() { $bids = self::getSchedulesBidsExpired(true); if(!$bids) return true; foreach($bids as $bid) { $sql = 'UPDATE '.TABLE_PREFIX.'schedules SET `bidid`=0 WHERE `id`='.$bid->routeid; DB::query($sql); } } now in your admin/maintenance.php after SchedulesData::deleteExpiredBids(); add SchedulesData::ResetSchedulesBidsExpired(); Hope it works for you
  10. piuozorio

    [Solved] How to import navdata.sql - csv included

    Hello all, for sure your mysql is limited to not import more than X MB. You can change the value, i think somewhere related with mysql or in php.ini, not sure. You have another option, i used in past one or two times and worked perfectly, take a look BIGDUMP http://www.ozerov.de/bigdump/ , this is more for very large .sql files like backups. Hope it helps
  11. piuozorio

    VA Central Pirep export

    Hello, today i tryed to send with success, thank you.
  12. piuozorio

    Problem with sending qued pireps to vacentral

    Hello all, same happened here. This is not the first time that happened, i think the pireps are exported but just returned a error message. Nabeel will see this topic and fix the problem we just need to be patient. Here is a old topic with the same "error" http://forum.phpvms.net/topic/6010-unable-to-upload-pireps-to-the-vacentral-server/page__hl__%20send%20%20pirep%20%20vacentral
  13. piuozorio

    Auto inactive system

    Hello, i think you have to add a cron job to auto retire work. You have the code in admin->site & settings->maintenance options Hope it helps
  14. Hello, my pirep table have about 286MB(13000 pireps) and no problems, i'm in shared host. The only problem that i had was in this topic and solved http://forum.phpvms.net/topic/6776-filing-pireps-delays-solved/page__hl__delay__fromsearch__1
  15. piuozorio

    Server Overloaded?!? Account Suspended!?!

    Thank you for the replies.
×