That file isn't really either a regular CSV or XML file; however having just had a quick look I think it can be quite easily manipulated using PHP's string functions to turn it into a regular CSV file (pipe separated, no header row, unquoted text), so the Format String would then be csv|124|0|0
Try something like this:
<?php require("MagicParser.php"); function myRecordHandler($record) { print_r($record); return TRUE; // stop after first record for testing purposes } $url = "{link saved}"; $csv = file_get_contents($url); $csv = str_replace("\n"," ",$csv); $csv = str_replace("<endrecord>","\n",$csv); MagicParser_parse("string://".$csv,"myRecordHandler","csv|124|0|0"); ?>
(don't forget to replace {link saved} with your feed URL)
Hi There,
That file isn't really either a regular CSV or XML file; however having just had a quick look I think it can be quite easily manipulated using PHP's string functions to turn it into a regular CSV file (pipe separated, no header row, unquoted text), so the Format String would then be csv|124|0|0
Try something like this:
<?php
require("MagicParser.php");
function myRecordHandler($record)
{
print_r($record);
return TRUE; // stop after first record for testing purposes
}
$url = "{link saved}";
$csv = file_get_contents($url);
$csv = str_replace("\n"," ",$csv);
$csv = str_replace("<endrecord>","\n",$csv);
MagicParser_parse("string://".$csv,"myRecordHandler","csv|124|0|0");
?>
(don't forget to replace {link saved} with your feed URL)
Hope this helps!
Cheers,
David.