00000000
What to do if I get error Failed to connect: Network is unreachable?By Milan Jovanovic on 23/07/18 in
We suppose that your server is on Bluehost. If the answer is yes, you have to add some code in
file ../wp-content/plugins/wpdatatables/source/class.wdttools.php around line 205 you will find this line of code:
curl_setopt($ch, CURLOPT_REFERER, site_url());
and after it add:
curl_setopt( $ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
This fix should resolve the issue that is related with Bluehost. Your code should looks like below.
curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch, CURLOPT_REFERER, site_url()); curl_setopt( $ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
Was this answer helpful ?
Yes
No