Hi,
I am using this code:
$curl_handle=curl_init();
curl_setopt($curl_handle, CURLOPT_URL, SITE_PATH . '../../blog/index.php');
$xml_file = curl_exec($curl_handle);
preg_match("/<title>(.*)<\/title>/i", $xml_file, $matches);
$title= $matches[1];
curl_close($curl_handle);
$title= $matches[1];
This code is supposed to open one local file and search for the title tag to have it as a variable value. But despite no error is displayed I am getting nothing as $title. What could be wrong?
Thank you.