<?php
$doc = new DOMDocument();
$source = <<<SOURCE
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Catalog SYSTEM "http://store.yahoo.com/doc/dtd/Catalog.dtd">
<Catalog ID="yhst-69328165909994" StoreName="Inmod Modern Furniture" PublishTimestamp="1517733517">
<Table ID="main-table-for-download">
<TableField ID="name" Type="text"/>
<TableField ID="sale-price" Type="numbers"/>
<TableField ID="path" Type="text"/>
<TableField ID="taxable" Type="yes-no"/>
<TableField ID="ship-weight" Type="numbers"/>
<TableField ID="price" Type="numbers"/>
<TableField ID="orderable" Type="orderable"/>
<TableField ID="code" Type="text"/>
</Table>
</Catalog>
SOURCE;
$doc->loadXML($source);
$systemId = $doc->doctype->systemId;
if (stripos($systemId, 'yahoo') !== false) {
echo "yahoo read";
} else {
echo "not yahoo read";
}
- Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
- yahoo read
preferences:
136.34 ms | 408 KiB | 5 Q