Check url field is not blank

'; } elseif(strlen($apikey)!=96 and strlen($apikey)!=100){ $infout='

Check api key in options

'; } else{ $ch = curl_init(); $data = array('fn' => esc_html($_POST['amifn']), 'pwd' => esc_html($_POST['amipwd']), 'url' => $url, 'act' => 'm', 'apikey' => $apikey, 'scrt' => '2'); curl_setopt($ch, CURLOPT_URL, 'http://www.amigura.co.uk/hide_file_api.php'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $infout='
'.curl_exec($ch).'
'; curl_close($ch); } } function ami_link_hide_opt_add() { /* Creates new database field */ $ami_options = array( 'apikey' => 'enter api key', 'dbstore' => '', 'useracc' => '1', 'vers' => '0.1' ); add_option("amigura_link_hide", $ami_options, '', 'yes'); } function ami_link_hide_opt_del() { /* Deletes the database field */ delete_option('amigura_link_hide'); } function ami_link_hide_opt_get() { /* get the database field */ return get_option( 'amigura_link_hide' ); } function ami_link_opt_upd() { /* update the database field */ $ami_options = ami_link_hide_opt_get(); $apikey=esc_html($_POST['amiapikey']); $dbstore=$_POST['amidbstore']; $useracc=$_POST['amiuseracc']; if(empty($apikey)){$apikey='enter api key';} if($dbstore!=1 or empty($dbstore)){$dbstore='';} if($useracc!=1 and $useracc!=2){$useracc=1;} $ami_options = array( 'apikey' => trim($apikey), 'dbstore' => $dbstore, 'useracc' => $useracc ); update_option( 'amigura_link_hide', $ami_options ); } function amigura_link_hide_api_status() { $ami_link_hide_res = ami_link_hide_opt_get(); $apikey=$ami_link_hide_res['apikey']; if ( current_user_can( 'manage_options' ) ) { if(strlen($apikey)!=96 and strlen($apikey)!=100){ echo "

Ami-Link Hide WP: please enter an API key or disable the plugin.

"; } } } ?>