I've been trying the "find updates" in Joomla for a few extensions, where I only get error messages such as Unable to open http://www.keashly.net/updates/kc_cufon.xml

You can perfectly open and retrieve the xml directly from a webbrowser, but in cUrl this results in

HTTP/1.1 302 Found
Date: Sat, 21 Feb 2015 17:11:35 GMT
Server: Apache
Location: http://www.keashly.net/
Cache-Control: max-age=3600
Expires: Sat, 21 Feb 2015 18:11:35 GMT
Vary: Accept-Encoding
Content-Length: 207
Content-Type: text/html; charset=iso-8859-1

<title>302 Found</title>
<p>The document has moved <a href=\"http://www.keashly.net/\">here</a>.</p>

I've tried explicitly setting the Host header and HTTP Version to 1.1, but nothing helps so far. Looking into a Net Panel in the browser there doesn't appear to be any redirect at all. Would you have any idea of what I'd need to do to get the file? Thanks for any hints!

  • Have you considered reaching out to the extension developer? While there may be someone in this community with experience in this extension, your best bet is to follow up with the developer directly. – johanpw Feb 21 '15 at 18:13
  • If you downvote a question, it would be most appreciated if you could comment with your reasoning, so that I might be able to avoid annoying you again in the future. – ExternalUse Feb 21 '15 at 18:13
  • @johanpw This wasn't extension specific but apparently a request issue. It appears that some webserver block requests without a (valid?) User-Agent – ExternalUse Feb 21 '15 at 18:15

Ah sorry, I just found an answer. Apparently many servers reject requests without a proper user agent given. Adding USERAGENT to my options sorted the issue

$options[CURLOPT_USERAGENT] = isset($userAgent) ? $userAgent : "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.