sign in • sign up
web | myLot | discussions | blogs | news | photos
homeinterestsdiscussionsblogsnewsmessages friendsphotosearningsmyLot

Question about PHP and XML email this discussion to a friend?

myLot reputation of 91/100. comedyaddict (368)   ranked 1 out of 61 in php6 months ago

Hi everyone.. hopefully someone can help me on this. I am trying to use an API from a website and then parse the information into my own website.

The API URL is http://lyricsfly.com/api/... which provides a XML file.

Does anyone know a way to parse an XML file (via a URL) into something usuable in PHP?

Thanks!

 
 
php
sponsors
TigerLogic XML Database
Scalable, high-performance XQuery Leverages time-proven PickĀ® UDM.
www.rainingdata.com

Real Estate Closing& Title Software
#1 Closing, Title& Escrow settlement software with over 50,000 users.
www.softprocorp.com

XML Differencing Utility
Easily Compare XML Files and Directories. Download free trial.
www.Altova.com/diffdog

User has not selected a best response.
tags:  php xml, parse api
 
1. myLot reputation of 84/100. raghwagh (1284)   5 months ago

Hi firend I think a small search on google will certainly help you and you will get a exacy answer to your question. There is a XML parser available in PHP and we can parse XML data easily.

TigerLogic XML Database Scalable, high-performance XQuery Leverages time-proven PickĀ® UDM. www.rainingdata.com
 
2. vivekwin_09 (3)   1 month ago

There are nothings but some things in use when you parse the API Some Examle i give below.
$aplilinkname="your api link";
$xml= @simplexml_load_file($aplilinkname) or die ("no file loaded");
foreach($xml->adresults->record as $record1){
$title= addslashes($record1->title);
$url= addslashes($record1->url);
....

Parse all the tags which are use in this Xml files

Real Estate Closing & Title Software #1 Closing, Title & Escrow settlement software with over 50,000 users. www.softprocorp.com