Server configuration by allow_url_fopen=0 in

@blytung Has a nice function to replace that function <?php $url = “”; $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 5); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true); $contents = curl_exec($ch); if (curl_errno($ch)) { echo curl_error($ch); echo “\n<br />”; $contents=””; } else { curl_close($ch); } if (!is_string($contents) || !strlen($contents)) { echo “Failed to get contents.”; … Read more

Fatal error: Uncaught Error: Cannot use a scalar as an array warning

You need to set$final[$id] to an array before adding elements to it. Intiialize it with either $final[$id] = array(); $final[$id][0] = 3; $final[$id][‘link’] = “”.$row[‘permalink’]; $final[$id][‘title’] = $row[‘title’]; or $final[$id] = array(0 => 3); $final[$id][‘link’] = “”.$row[‘permalink’]; $final[$id][‘title’] = $row[‘title’];