[TYPO3-v4] getUrl issues - linkvalidator
    Philipp Gampe 
    typo3.lists at philippgampe.info
       
    Tue Mar 15 19:25:10 CET 2011
    
    
  
Steffen Kamper wrote:
> maybe it's an option to use fsockopen and read only a static amount of
> bytes?
Could be a good option... but what is static and a safe default?
We could use $max = ini_get('memory_limit') - memory_get_usage() - x;
But memory_get_usage() might fail in Windows systems - happy platform 
independent coding :(.
As long as we are not using curl, fsockopen is already used.
x could be 1MB or so, just to be on the save side.
Of course we could also read chunks until $max is reached.
Best regards
-- 
Philipp Gampe
    
    
More information about the TYPO3-project-v4
mailing list