开发者

Open remote gzip XML file for use with SimpleXML

开发者 https://www.devze.com 2023-02-05 22:37 出处:网络
I\'m having trouble retrieving and decompressing a remote gzip XML file. To get the file I\'m using: $url = \'http://www.domain.com/xml.gzip\';

I'm having trouble retrieving and decompressing a remote gzip XML file.

To get the file I'm using:

$url = 'http://www.domain.com/xml.gzip';
$linkToXmlFile = fopen("compress.zlib://$url", "r");

Then I've tried:

try {
    $xml = new SimpleXmlElement($rawFeed);
开发者_运维知识库    ...
}

To no avail.


Tried this ?

$xml = new SimpleXMLElement("compress.zlib://$url", NULL, TRUE);
0

精彩评论

暂无评论...
验证码 换一张
取 消