[TYPO3-dev] t3lib_div::getURL

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Tue May 20 09:38:17 CEST 2008


Dan Osipov schrieb:
> Hey group,
> 
> I've tried using the t3lib_div::getURL function to get contents of XML 
> files over HTTP (Yahoo REST web service). I've found that it is very 
> unstable. Sometimes it returns the content, but at times it returns 
> FALSE. Stepping into the function, it shows that it hits a 400 HTTP 
> error on line 2618:
> $content = @file_get_contents($url, false, $ctx);

Do you really need to send or get the HTTP headers? AFAIR the context is 
only used by TYPO3 if you either request or send (additional) HTTP headers.

Try using TYPO3 4.2 and the new $report argument of getURL.

Masi




More information about the TYPO3-dev mailing list