Hello,
for the last few hours I've been trying to solve the following problem, I couldn't figure it out.
I'm trying to obtain the XML content of a data provider...
However, the following code only returns the text between the xml tags:
echo file_get_contents("http://ir.ub.rug.nl/oai/?verb=ListRecor ... fix=oai_dc");
I need the whole xml structure though.
I'd appreciate if you could give me a hint about this.
Regards,
Pesho
Problems with file_get_contents()
Moderator: General Moderators
The hole xml structure is there, you just need to view the source, because the browser is outputting it like text, so its ignoring the what it thinks are "html" brackets.
-Zoxive
Code: Select all
<?php
// Just telling the browser its xml, to show you that its giving you everything
header("Content-type: text/xml");
echo file_get_contents("http://ir.ub.rug.nl/oai/?verb=ListRecords&metadataPrefix=oai_dc");
?>
Last edited by Zoxive on Wed Mar 21, 2007 5:13 pm, edited 1 time in total.
- harrisonad
- Forum Contributor
- Posts: 288
- Joined: Fri Oct 15, 2004 4:58 am
- Location: Philippines
- Contact: