Connecting SEOmoz API to Mysql database

42 views
Skip to first unread message

bob

unread,
May 5, 2011, 6:57:37 PM5/5/11
to The Easy API
Can anyone point me to any basic literature on how I would go about
connecting the SEOmoz API output to a MySql database using PHP?

Bob Sorenson

C. Smith

unread,
May 5, 2011, 7:21:53 PM5/5/11
to The Easy API
Hey Bob,

If you are using PHP5 you can use SimpleXML. It's by far one of the
best objects that PHP introduced into PHP5. It comes as a standard
package so no need to install anything different.

Now, assuming you could follow the ideas on the "Extras" page on the
website you could then get the output into $strPage. From there you
could do the following so you can see the structure.

<?php
$xml_load = simplexml_load_string($strPage);
echo "<pre>";
print_r($xml_load);
echo "</pre>";
?>

You will then see the XML structure for SEOMoz and any other service
that we offer for that matter.

Take care and good question!
Chad
Reply all
Reply to author
Forward
0 new messages