Here's what my function looks like
(query is submitted through user form)
function getTitle($query) { $opts = array('https'=>array('header'=> 'Connection: close')); $context = stream_context_create($opts); $pattern = "/<title ?.*>(.*)<\/title>/"; preg_match($pattern, file_get_contents($query,false,$context), $matches); return $matches[1]; }The function works it just takes way too long.
I thought I was cool by adding in $context but it didn't change anything. Some articles online suggested switching to "curl"
tactics and I just wanted to know if that will really work. =)