Attention PHP developers!
You can build powerful search applications in PHP using MarkLogic Server with an open source PHP API, called MLPHP. The API makes it easy for PHP developers to store documents, manage document metadata, and create sophisticated search queries on a web server running PHP 5.3 or later. It communicates with MarkLogic using the server’s REST API, available in MarkLogic 6 or later.
The PHP API is available for download at GitHub. See the INSTALL.txt file to get started and then check out the API Docs. After installing the PHP API, you can load documents into MarkLogic with just a couple lines of PHP code:
$document = new MLPHPDocument($client);
$document->setContentFile('myfile.xml')->write('/myfile.xml');
Searching is just as easy:
$search = new MLPHPSearch($client);
$results = $search->retrieve('cat');
MLPHP is a work-in-progress. If you have questions or want to provide some feedback, you can file issues at GitHub, or drop me a line directly at mike.wooldridge AT marklogic dot com.
To download MarkLogic Server and use the free Express license, go here.
(If you want to build applications in Java, MarkLogic also has a great Java API.)
Mike Wooldridge is a Senior Software Engineer at MarkLogic. He has built some of the software tools that ship with MarkLogic, including Monitoring History, and has authored open-source projects such as MLPHP. Mike is the coauthor of the latest edition of Inside MarkLogic Server and has also written books for Wiley on graphics software and web design, including Teach Yourself Visually Photoshop CC and Teach Yourself Visually HTML5.
Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.
Learn MoreSubscribe to get all the news, info and tutorials you need to build better business apps and sites
Progress collects the Personal Information set out in our Privacy Policy and the Supplemental Privacy notice for residents of California and other US States and uses it for the purposes stated in that policy.
You can also ask us not to share your Personal Information to third parties here: Do Not Sell or Share My Info
We see that you have already chosen to receive marketing materials from us. If you wish to change this at any time you may do so by clicking here.
Thank you for your continued interest in Progress. Based on either your previous activity on our websites or our ongoing relationship, we will keep you updated on our products, solutions, services, company news and events. If you decide that you want to be removed from our mailing lists at any time, you can change your contact preferences by clicking here.