Skip to content

Resolve get_headers() timeout warning #11

@jinksraevan

Description

@jinksraevan

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions