Garry Claridge Posted August 7, 2002 Posted August 7, 2002 I have been doing some testing with FM and PHP. The PHP is standard on an OS X Server. I have been able to find data and edit records from a FM database using the PHP 'readfile()' function. Like this: <?php readfile ("http://10.0.1.2:1154/FMPro?-db=combotest.fp5&-lay=web&-format=hworld.html&name=bloggs&-recid=1&-edit"); ?> Hope this is of interest. Garry
Keith M. Davie Posted August 7, 2002 Posted August 7, 2002 I have seen others refer to working with .php and FMP. FMP has made it quite clear they are XML ready. Do you also write xml? (Here I'm looking for comparative information as to usefulness.) If you don't write xml, why did you gravitate to .php? Just curious.
Garry Claridge Posted August 7, 2002 Author Posted August 7, 2002 Good questions. I have been using PHP recently to talk to a mySQL database. A job I am working on required 'Open Source'. Both of these are available as 'Open Source' and come with OS X Server. Also, mySQL and PHP hosting are easy to come-by and less expensive than FM hosting. Another job I am working with is an XML Registry, whilst I am not an XML expert (yet!), I think Java will be the middleware. This is so different database types can be used (FM included). I have a couple of aims for using PHP with FM/CDML. One is for security reasons, all access to the FM db can be through PHP with no direct access available. The other reason is for interoperability and integration of different data-sources. I don't intend to use ODBC for the connections. It will all be PHP/CDML, which has been very fast so far. I used a similar system with Flash and FM/CDML over a year ago. This worked very well. It was for games, so that the players could keep highest scores etc, and that data would be integrated with a much larger database system. FM/CDML is easy to work with and is my preference. However, being able to use FM/CDML with PHP opens up more opportunities. All the best. Garry
Anatoli Posted August 7, 2002 Posted August 7, 2002 Thank you! I wish I had more time Or the day last 30 hours
Keith M. Davie Posted August 9, 2002 Posted August 9, 2002 Garry, you wrote in response to my earlier inquiry, "I have a couple of aims for using PHP with FM/CDML. One is for security reasons, all access to the FM db can be through PHP with no direct access available. The other reason is for interoperability and integration of different data-sources.". Does xml allow direct access to FMP? Are the security issues with xml the same as with Web Security, greater or lesser? Would it be possible to integrate php with xml to take advantage of security, or to increase security? I'm curious. I've this past week started to read a text on xml (only 800 pages to go) and I have yet to get into php.
Garry Claridge Posted August 9, 2002 Author Posted August 9, 2002 Keith, Extracting XML from FM offers exactly the same security challenges. A typical URL would look like this: http://localhost/FMPro?-db=pages.fp5&-lay=web&-format=-fmp_xml&-findall I haven't used PHP with XML yet. However, using the 'readfile()' and 'file_get_contents()' (in current beta vers of PHP) functions, you can 'hide' the database from the outside world. It could be on another computer on your LAN, or you can embed a 'userid' and 'password' into the PHP code which constructs the URL. All the best. Garry
Keith M. Davie Posted August 9, 2002 Posted August 9, 2002 Thanks Garry, I'll keep this thread in mind as I proceed. I really appreciate your input.
Garry Claridge Posted August 9, 2002 Author Posted August 9, 2002 Thank you I will keep reporting on how I go with integrating PHP and CDML. I'm going on holidays for a week in North Queensland; so I will be absent for a little while. All the best. Garry
Anatoli Posted August 9, 2002 Posted August 9, 2002 All the best. I am going to fight the boys from FileMaker Inc. in Desert Springs -)
VoidState Posted October 16, 2002 Posted October 16, 2002 so... have you investigated this further? Any chance of an update? I currently have PHP - Filemaker communicating through ODBC but it seems rather slow. I'd appreciate any hints at alternative methods using PHP & Filemaker. VS
Garry Claridge Posted October 16, 2002 Author Posted October 16, 2002 I have been able to insert data into a PHP page like this: <html> <head> <title>fm2php.php</title> <meta name="generator" content="BBEdit 6.5.3"> </head> <body><table> <?php $myData = file ("http://10.0.1.2:1154/FMPro?-db=combotest.fp5&-lay=web&-format=fm2php.txt&-findall"); while (list ($line_num,$line) = each ($myData)) { echo "<tr><td>", trim (htmlspecialchars ($line)), "</td></tr>"; } ?> </table></body> </html> Here is the Format file, fm2php.txt:[FMP-Record][FMP-Field:name,raw] [/FMP-Record] I have not tested this with large files. However, the speed with small files is fast. All the best. Garry
lenomadecom Posted October 22, 2002 Posted October 22, 2002 Hello I'v been using php/xml/filemaker for the last month and it works pretty well. Thanks to www.iviking.org you can see it at work (in french) at www.fmqc.ca/fr/succes.php The system works in combination with the xml output from the web compagnion and it is as fast as the regular cdml system. Hope it helps.
Recommended Posts
This topic is 8137 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now