Invalid format! Correct it and try again. Format should be: USERNAME without @ (e.g. theto3k).
If further failures occur, report the problem using this form."; } $mastodon = trim(addslashes(strip_tags($_POST['mastodon']))); $check2 = '/^[a-zA-Z0-9_]+@[a-zA-Z0-9\-.]+\.[a-zA-Z]+/'; if(!preg_match($check2, $mastodon)) { $message2 = " Invalid format! Correct it and try again. Format should be: USERNAME@INSTANCE (e.g. to3k@mstdn.social).
If further failures occur, report the problem using this form.

"; } if($_POST['consent'] != "agree") { $message3 = " Consent for data processing is required.
"; } if(empty($message1) AND empty($message2) AND empty($message3)) { $query = "SELECT * FROM connections WHERE twitter_login='".$twitter."' AND mastodon_login='".$mastodon."' LIMIT 1"; $result = mysqli_query($mysqli, $query) or die('ERROR TD02'); if(mysqli_num_rows($result) == false) { $nitter_link = "https://nitter.net/".$twitter; $curl = curl_init($nitter_link); curl_setopt($curl, CURLOPT_URL, $nitter_link); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36'); curl_setopt($curl, CURLOPT_TIMEOUT, 30); curl_setopt($curl, CURLOPT_HEADER, 0); $site_source_code = curl_exec($curl); for($i=1; $i<=5; $i++) { if($site_source_code == "") { $site_source_code=curl_exec($curl); } else { break; } } preg_match("(class=\"profile-card-fullname\" href=\"(.+?)\".+?>(.+?))is", $site_source_code, $phrase); $twitter_test = addslashes(strip_tags($phrase[1])); $twitter_name = addslashes(strip_tags($phrase[2])); if(empty($twitter_test)) { $message1 = " Are you sure that this account exists? Check if entered username is correct.
If further failures occur, report the problem using this form.
"; } $explode = explode("@", $mastodon); $mastodon_user = $explode[0]; $mastodon_server = $explode[1]; $mastodon_link = "https://".$explode[1]."/@".$explode[0]; $mastodon_rss = $mastodon_link.".rss"; $curl = curl_init($mastodon_rss); curl_setopt($curl, CURLOPT_URL, $mastodon_rss); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36'); curl_setopt($curl, CURLOPT_TIMEOUT, 30); curl_setopt($curl, CURLOPT_HEADER, 0); $site_source_code = curl_exec($curl); for($i=1; $i<=5; $i++) { if($site_source_code == "") { $site_source_code=curl_exec($curl); } else { break; } } preg_match("((.+?).+?(.+?))is", $site_source_code, $phrase); $mastodon_name = addslashes(strip_tags($phrase[1])); $mastodon_test = addslashes(strip_tags($phrase[2])); if(empty($mastodon_test)) { $message2 = " Are you sure that this account exists? Check if entered username is correct.
If further failures occur, report the problem using this form.

"; } $today = date("Y-m-d"); if(empty($message1) AND empty($message2)) { $add = "INSERT INTO connections (twitter_login, twitter_verified, mastodon_login, mastodon_verified, twitter_name, mastodon_name, date) VALUES ('".$twitter."', '0', '".$mastodon."', '0', '".$twitter_name."', '".$mastodon_name."', '".$today."')"; mysqli_query($mysqli, $add) or die('ERROR TD03'); } } if(empty($message1) AND empty($message2)) { header("Location: confirm.php?t=".$twitter."&m=".$mastodon); } } } mysqli_close($mysqli); //Change language $full_url = "https://pl.twittodon.com".$_SERVER['REQUEST_URI']; ?> Connect - Twittodon.com - Connect your Twitter and Mastodon accounts and verify it!

"; ?>

"; ?>

Connect"; ?>