<?
echo "this {free php} is gunna take forever<br />";
echo "and cost the developer more $$ because he was a cheapo and wanted to save
a few bucks<br />";
echo "I dont think php has easy xml creation like cfm<br />";
echo "These 8 lines of code are gunna turn into a million or so in php<br />";
echo "have fun with that... I sure am glad i am not you.<br />";
?>
>Can anyone take this simple bit of CF code and convert it into PHP for me? I
>have no experience with PHP at all and this CF code now needs to run on a
>PHP server.
>
><cfparam name="url.tags" default="photowalkthrough">
><cfhttp
>url="http://api.flickr.com/services/feeds/photos_public.gne?tags=#url.tags#&
>format=rss_200" method="get" />
><cfset parsedXML = xmlParse(cfhttp.FileContent)>
><cfset randomNumber = randRange(1,arrayLen(parsedXML.rss.channel.item))>
><cfset randomImage =
>parsedXML.rss.channel.item[randomNumber]['media:content']['XmlAttributes']['
>URL']>
><cfhttp url="#randomImage#" getasbinary="yes" />
><cfcontent type="image/jpeg" variable="#cfhttp.FileContent#">
>
>Thanks in advance to anyone who can port it.
>
>--
>Jay
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 &
Flex 2
Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU
Archive:
http://www.houseoffusion.com/groups/CF-Community/message.cfm/messageid:235784
Subscription: http://www.houseoffusion.com/groups/CF-Community/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5