1 or 2 seconds
$url = trim($_POST['url']);
$html = @file_get_contents($url);
30+ seconds to load
$url = $_POST['url'];
$html = @file_get_contents(trim($url));
I’m always curious when I discover things like this what is going on under the hood.
Cheers,
I wouldn’t be expecting that much of a performance increase for
trimin fact, I’ve never seen anything that would even suggest why that would be happening.What are you using to post your data with? Sure it’s not a fluke?