[TYPO3-v4] getUrl issues - linkvalidator

Jigal van Hemert jigal at xs4all.nl
Tue Mar 15 12:28:40 CET 2011


Hi,

On 15-3-2011 9:27, Ernesto Baschny [cron IT] wrote:
> But maybe we should just use "curl" and make it a required PHP module
> for TYPO3 4.6? In my opinion curl has (almost) "all we need" (and more)
> instead of writing yet another solution in straight PHP. Curl handles
> proxies, HTTPs, GET, POST, Authentication, Cookies, Redirects, content
> decoding, ...  And its shipped with all major distributions.

I'm not sure if all 'major' hosting companies (there are some obscure 
companies used by big organisations and governmental bodies) provide curl.

> What we just need is then a t3lib wrapper for the more complex stuff
> cURL offers which we currently cannot influence in t3lib_div::getUrl
> (like disabling SSL verification, doing POST, ...).

Maybe the best implementation is to use a handler. After the cURL 
handler we can always add a plain PHP version or one that uses another 
library.

> The only drawback to that is that we cannot request only the headers
> with a "GET" statement, which is what the link validation needs (we've
> experienced the same trouble already). Doing a HEAD is not enough for
> checking if an URL really works, unfortunately. Maybe it could be done
> with curl somehow?

Without cURL it would be quite easy: do a GET and stop retrieving 
information after the headers arrived.

-- 
Kind regards / met vriendelijke groet,

Jigal van Hemert.


More information about the TYPO3-project-v4 mailing list