xml-to-json icon indicating copy to clipboard operation
xml-to-json copied to clipboard

Resolve get_headers() timeout warning

Open ethanraevan opened this issue 3 years ago • 0 comments

A user reached out to me saying they had an issue converting an XML feed:

https://api.factmaven.com/xml-to-json/?xml=https://nitter.net/official_kep1er/rss

This is the error is gives:

<br />
<b>Warning</b>:  get_headers(https: //nitter.net/official_kep1er/rss): Failed to open stream: Connection timed out in <b>/home/factmaven/www/xml-to-json/index.php</b> on line <b>35</b><br />
<br />
<b>Warning</b>:  Trying to access array offset on value of type bool in <b>/home/factmaven/www/xml-to-json/index.php</b> on line <b>36</b><br />
{
    "error": {
        "timestamp": "2022-05-18 12:17:00 EST",
        "status": 0,
        "title": "",
        "detail": "The URL you provided does not point to an valid XML feed. Please check that you entered the correct URL.",
        "url": "/xml-to-json/?xml=https://nitter.net/official_kep1er/rss"
    },
    "meta": {
        "version": "2.0.2",
        "copyright": "Copyright 2011-2022 Fact Maven",
        "link": "https://factmaven.com/",
        "authors": [
            "Ethan O'Sullivan",
            "Edward Bebbington"
        ]
    }
}

It looks like there is some timeout issue with accessing the feed. I'll need to investigate further.

ethanraevan avatar May 18 '22 16:05 ethanraevan