' . $message . '

'; include('footer.php'); die(); } if ( empty( $_REQUEST['url'] ) ) { display_error( yourls__( 'You haven\'t entered a URL to shorten. Please go back and try again.', 'isq_translation' ) ); }; if ( !empty(ISQ::$recaptcha['sitekey']) && !empty(ISQ::$recaptcha['secret']) ) { $recaptcha_data = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . ISQ::$recaptcha['secret'] . '&response=' . $_REQUEST['g-recaptcha-response']); $recaptcha_json = json_decode($recaptcha_data, TRUE); // What happens when the CAPTCHA was completed incorrectly if ( $recaptcha_json['success'] != 'true' ) { display_error( yourls__( 'Are you a bot? Google certainly thinks you are. Please go back and try again.', 'isq_translation' ) ); } } else { if ( $_REQUEST['basic_antispam'] != "" ) { display_error( yourls__( 'Are you a bot? The verification was not completed successfully. Please go back and try again.', 'isq_translation' ) ); } }; // Get parameters -- they will all be sanitized in yourls_add_new_link() $url = $_REQUEST['url']; $keyword = isset( $_REQUEST['keyword'] ) ? $_REQUEST['keyword'] : '' ; $title = isset( $_REQUEST['title'] ) ? $_REQUEST['title'] : '' ; $text = isset( $_REQUEST['text'] ) ? $_REQUEST['text'] : '' ; // Create short URL, receive array $return with various information $return = yourls_add_new_link( $url, $keyword, $title ); $shorturl = isset( $return['shorturl'] ) ? $return['shorturl'] : ''; $message = isset( $return['message'] ) ? $return['message'] : ''; $title = isset( $return['title'] ) ? $return['title'] : ''; $status = isset( $return['status'] ) ? $return['status'] : ''; // URL encoded links used in the social sharing buttons $encoded_shorturl = urlencode($shorturl); $encoded_title = urlencode($title); // QR code shenanigans if ( ISQ::$general['qr'] ) { include('public/phpqrcode/qrlib.php'); $qrContainerId = 'url-qr-code'; $saveToFile = false; $imageWidth = 600; // in pixels $qrCode = QRcode::svg($url, $qrContainerId, $saveToFile, QR_ECLEVEL_L, $imageWidth); }; ?>

' . yourls__( 'Copy to clipboard', 'isq_translation' ) . ''; } ?>
' . yourls__( 'Copy to clipboard', 'isq_translation' ) . ''; } ?>
' . yourls__( 'Copy to clipboard', 'isq_translation' ) . ''; } ?>

' . file_get_contents('public/images/twitter.svg') . ''; } if ( ISQ::$social['appdotnet'] ) { echo ''; } if ( ISQ::$social['facebook'] ) { echo ''; } if ( ISQ::$social['tumblr'] ) { echo ''; } if ( ISQ::$social['linkedin'] ) { echo ''; } if ( ISQ::$social['googleplus'] ) { echo ''; } ?>
' . yourls__( 'QR code', 'isq_translation' ) . '

' . yourls__( 'Share your link with external devices', 'isq_translation' ) . '

' . $qrCode; } ?>