The new website for MarkLogic is www.progress.com/marklogic. Visit it.
BLOG ARTICLE

MarkLogic Labs PHP API

Back to blog
11.28.2012
0 minute read
Back to blog
11.28.2012
0 minute read

Attention PHP developers!

PHP

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

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.

Read more by this author

Share this article

Read More

Related Posts

Like what you just read, here are a few more articles for you to check out or you can visit our blog overview page to see more.

Community

CEO Reflections on Juneteeth

Update on employee engagement during the pandemic, and the work of our DE&I team.

All Blog Articles
Community

What You’ll Learn at MarkLogic World 2020

Find out who will be presenting at our first-ever virtual MarkLogic World, and what they’ll be covering.

All Blog Articles
Community

MarkLogic World 2020: Integrate to innovate – and to respond to COVID-19

Learn how we’re taking MarkLogic World virtual this year, and how you can participate – from keynotes to breakout sessions, training and more.

All Blog Articles

Sign up for a Demo

Don’t waste time stitching together components. MarkLogic combines the power of a multi-model database, search, and semantic AI technology in a single platform with mastering, metadata management, government-grade security and more.

Request a Demo