/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php // build request format // method name $xml->addChild('methodName','flickr.photos.search'); // parameters list $params = $xml->addChild('params',null)->addChild('param',null)->addChild('value',null)->addChild('struct',null); // add api key $child = $params->addChild('member',null); $child->addChild('name','api_key'); $child->addChild('value','**key-value**'); // add tag to search for $child = $params->addChild('member',null); $child->addChild('name','tags'); $child->addChild('value','ibuildings'); // make request $url = 'http://api.flickr.com/services/xmlrpc/';