![]() |
PHP Script - Printable Version +- FsPassengers Forums (http://www.fspassengers.com/forum) +-- Forum: FsPassengers (http://www.fspassengers.com/forum/forumdisplay.php?fid=3) +--- Forum: FsPassengers Support (http://www.fspassengers.com/forum/forumdisplay.php?fid=5) +--- Thread: PHP Script (/showthread.php?tid=6184) |
PHP Script - rkuiper - 13-04-2006 Can someone help me. I don't know PHP, but I'm trying to make this work with CF. My question is in the common.php it's got the variable 'databaseconnexion=true' Now I think it needs another variable which is the variable 'db'. I don't know what kind of value it returns. But I think I need to get the message "Attempt To connect to website...Connection etablished - OK.". Anybody have any ideas? Thanks, Re: PHP Script - Andrew The Muffin - 19-04-2006 Hmmm, get in contact with PDJpeter he surfs these forums regurarly. He might be able to help, but I'm not sure if he does PHP but you should try and get in touch with him anyway. -Andrew Re: PHP Script - eazy - 19-04-2006 I would like to help if I was sure I understood your question ![]() However, here's a "non-official" attempt to explain what happens between FSP and FsPgetflight.php/common.php: Whenever you select "Export Flight to VA" through FSP's menu inside FS9, FsPassengers.dll communicates with the PHP script FsPgetflight.php on the appropriate server. At first the common.php script (which is included in FsPgetflight.php) tries to establish the connection to the MySQL server, which it does through the mysql_connect function. The result of this call can either be TRUE (connection established) or FALSE (connection failed) and is stored in the variable $db. Only if $db is TRUE the next step in common.php is to check if the required database exists on that MySQL server, which is done through the function mysql_select_db. Again, the result can be TRUE or FALSE and it is stored in $databaseconnexion which is the only variable returned to the main script. All that FsPgetflight.php does then is to send a reply to FsPassengers.dll which is either #Answer# Ok (if $databaseconnexion is TRUE) or #Answer# Error (if it's FALSE). The message you read (Attempt To connect to website...Connection etablished - OK.) seems to be hardcoded in FsPassengers.dll and replaces the #Answer# part. Basically it's just a normal http communication between the dll module and the script, so it might be possible to do the same thing with ColdFusion, unfortunately I don't know enough about CF to help any further. Re: PHP Script - DanSteph - 20-04-2006 Eazy is right. Basically you don't need to care about dll, all you have to know is that FsP send a serie of "FORM POST" request to the site and read the reply displayed on the html page. This mean that ANY language used on the web that is dynamicall can communicate and store FsP export. PHP is simple to read a bit like basic, while reading the "FsPGetFlight.php" you can get all the info needed to get the export of FsP. Dan Post Edited ( 04-20-06 01:29 ) |