Tried it but not getting anything on it.
I just replaced file_get_contents with the cURL but get nothing but also do not get any errors.
This is what I'm trying...
<?php
error_reporting(E_ALL ^ E_NOTICE); // Report all errors except E_NOTICE warnings
ini_set('display_errors', 0); // turn error reporting on
ini_set('log_errors', 1); // log errors
ini_set('error_log', dirname(__FILE__) . '/error_log.txt'); // where to log errors
$ch = curl_init(); // initialize a cURL session
curl_setopt($ch, CURLOPT_URL, "http://www.vermilioncountyfirst.com/category/more-news"); // connect to provided URL
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // don't verify peer certificate
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3); // connection timeout
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // return the data transfer
curl_setopt($ch, CURLOPT_NOBODY, false); // set nobody
curl_setopt($ch, CURLOPT_HEADER, true); // include header information
curl_setopt($ch, CURLOPT_TIMEOUT, 4); // overall timeout (start to finish)
$data = curl_exec($ch); // execute session
if (preg_match('/More News<\/span>(.+?)<div id=\"nav-below\"/s' , $data, $n)){
$html = trim($n[1]);
$html = preg_replace("/\’/" , "'" , $html);
$html = preg_replace("/\‘/" , "'" , $html);
$html = preg_replace("/\“/" , " " , $html);
$html = preg_replace("/\”/" , " " , $html);
$html = preg_replace("/\é/" , "e" , $html);
$html = preg_replace("/\—/" , " " , $html);
$html = preg_replace("/\medium”/" , "1" , $html);
$html = preg_replace("/\—/" , " - " , $html);
$html = preg_replace("/\–/" , " - " , $html);
$html = preg_replace("/\Â\;/" , " " , $html);
$html = preg_replace("/\*/" , " " , $html);
$html = preg_replace("/x\-large/" , "1" , $html);
$html = preg_replace("/\#000000/" , "khaki" , $html);
$html = preg_replace("/\~/" , " " , $html);
$html = preg_replace("/\&\#8221\;/" , " " , $html);
$html = preg_replace("/color\: black/" , "color\: khaki" , $html);
}
echo $html;
?>