Pilot Discussion With a Global Perspective
By Vladislav Oupicky 1003771
#427335 I am attempting to pre-fill http://www.vatsim.net/fp/ form with data, that each pilot prepares on our VA website.

Sending GET variables to this page used to work. It doesn't seem to work now.
Sending POST variables works, but the users are presented with this message:
Code: Select allThe following fields are required and must be filled in before we can process your request:

Filing from an external source is not permitted. Contact the webmaster for the site you used and ask him to update his site so that it only attempts to prefill fields on this form. Additionally, you may NOT use the 'back' function on your browser to retry entries on a form.

How to to the pre-filling correctly?
Thanks for any advice
By Christoph Neukirch 1035754
#427348 Could you please drop me an email to vpweb[at]vatsim.net with the complete GET Query String. I had to change something in the code to get rid of register_globals and don't was aware of it's being used via GET.

kind regards
Christoph
By Andrew Dmitriev 1160980
#443586
Vladislav Oupicky 1003771 wrote:I am attempting to pre-fill http://www.vatsim.net/fp/ form with data, that each pilot prepares on our VA website.
How to to the pre-filling correctly?

Gentlemen!
Is there any way (some web-interface) to fill the flight plan directly to VATSIM without manual filling the form?
By Svilen Vassilev 1175035
#443602
Andrew Dmitriev 1160980 wrote:Gentlemen!
Is there any way (some web-interface) to fill the flight plan directly to VATSIM without manual filling the form?


Some planning software, like vroute or Virtual dispatch support automatic pre-filling of the Vatsim form. There might be others as well, of course.
By Svilen Vassilev 1175035
#443606
Andrew Dmitriev 1160980 wrote:
Svilen Vassilev 1175035 wrote:Some planning software, like vroute or Virtual dispatch support automatic pre-filling of the Vatsim form. There might be others as well, of course.
Sure, but I'd like to book the flight directly from own VA site...


In this case you can send a GET request from your VA website to the vatsim web form, combining all the data fields you want prefiled. All that remains would be for the pilot to hit the submit button on the form, or to fill in their CID/password, depending on if you have these credentials stored in your VA database and want to pass them via an unencrypted http connection. Here's an example request with the different fields, you can play with it and adjust it to your needs:

Code: Select allhttp://www.vatsim.net/fp/index.php?fpc=&1=I&2=ACH7790&3=T/AT72/E&4=250&5=LQSA&6=1552&7=FL140&8=BOSNA&9=LQBK&10a=00&10b=48&voice=/V/&11=RTF=AIRCHILD%20/www.air-child.com&12a=01&12b=47&13=LQTZ&14=Svilen%20Vassilev%20LBSF
By Norman Blackburn 870575
#443614
Svilen Vassilev 1175035 wrote:All that remains would be for the pilot to hit the submit button on the form, or to fill in their CID/password, depending on if you have these credentials stored in your VA database and want to pass them via an unencrypted http connection.


The nature of the form is that it wont accept entries into fields 15 & 16. To have them stored by the VA would be against the rules we all agreed to on signing up to VATSIM.
By Sava Markovic 1109329
#443615 One question :)
I have for some time wanted to connect the Book A Flight Feature on my VA website to the FP pre-file feature.
So if I write a code that will automatically fill the fields for the VATSIM FP using the data from the VA booked flight data and than require a one more manual entry from the pilot for the VATSIM password that will not in any way be stored on our site, is this allowed?

That is if I can actually manage to write this.
Thank you for the input!
By Svilen Vassilev 1175035
#443616
Norman Blackburn 870575 wrote:The nature of the form is that it wont accept entries into fields 15 & 16. To have them stored by the VA would be against the rules we all agreed to on signing up to VATSIM.


Thanks for the clarification, Norman. That makes perfect sense indeed. Some 3rd party tools however allow the user to optionally enter and store this information in their databases for prefile functionality (Virtual Dispatch for example). Technically there are methods to inject the credentials into the form, for example by running a piece of javascript locally on the user machine (password managers like Last Pass and the like do it in this manner).

Sava Markovic 1109329 wrote:One question :)
I have for some time wanted to connect the Book A Flight Feature on my VA website to the FP pre-file feature.
So if I write a code that will automatically fill the fields for the VATSIM FP using the data from the VA booked flight data and than require a one more manual entry from the pilot for the VATSIM password that will not in any way be stored on our site, is this allowed?

That is if I can actually manage to write this.
Thank you for the input!


Sava,
what you need to do is:
1. Get the data for all the fields you want prefilled: these are all text strings, properly validated, stripped of incompatible characters (allthough I presume vatsim script will do its own vaildation upon submission and will reject any suspicious entries).
2. Construct an URL string for the HTTP GET request, combining the params and data fields as shown on the example above.
3. Display this URL as a hyperlink on your VA site, upon clicking the link the VATSIM form page will open with all the fields pre-filled, and as you said, all that remains for the user will be to enter their credentials and submit the form.

The exact methods used would depend on the programming language and existing codebase of your VA site. If in trouble: poke me on email or skype, I'll see if I can help with the code.
By Anders Moen 1066135
#481367 URL has changed ;)
New URL with the string posted earlier on:
Code: Select allhttps://cert.vatsim.net/fp/file.php?fpc=&1=I&2=ACH7790&3=T/AT72/E&4=250&5=LQSA&6=1552&7=FL140&8=BOSNA&9=LQBK&10a=00&10b=48&voice=/V/&11=RTF=AIRCHILD%20/www.air-child.com&12a=01&12b=47&13=LQTZ&14=Svilen%20Vassilev%20LBSF