"; echo "Mailer Error: " . $mail->ErrorInfo; }else{ #echo "Message Sent: ".$to2; } } function sendmail($from2, $to2, $subject2, $message2) { //echo 'sending email'.$to2; $mail = new PHPMailer(); $mail->SMTPKeepAlive = false; $mail->Priority = 1; $mail->SMTPDebug = 2; $mail->Timeout = 45; // set mailer to use SMTP $mail->Host = "mail.guapas.org"; // specify main and backup server $mail->SMTPAuth = false; // turn on SMTP authentication $mail->Username = "info@guapas.org"; // SMTP username $mail->Password = "GrabIt321#"; // SMTP password $mail->From = "info@guapas.org"; $mail->FromName = "guapas.org"; $mail->AddAddress($to2, "guapas.org"); // $mail->AddAddress("ellen@example.com"); // name is optional $mail->AddReplyTo("info@guapas.org", "guapas.org"); //$mail->WordWrap = 50; // set word wrap to 50 characters //$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments //$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name //$mail->IsHTML(true); // set email format to HTML $mail->Subject = $subject2; $message2 .= " ==================================================== https://www.guapas.org Telegram Channel: https://t.me/steelemove Reset Login: https://www.guapas.org/forgot_pass.php "; $mail->Body = $message2; //$mail->AltBody = $message2; if(!$mail->Send()) { // echo "Message could not be sent.
"; // echo "Mailer Error: " . $mail->ErrorInfo; } } $cats=array("people"=>"People","nature"=>"Nature","architecture"=>"Architecture","objects"=>"Objects","funny"=>"Funny","others"=>"Others"); $a_rstatus=array("0"=>"Not Disclosed","1"=>"Single (Looking)","2"=>"Married","3"=>"Open Relationship","4"=>"Single (Not Looking)","5"=>"In Loving Relationship","6"=>"Dating Someone"); $a_liketypes=array("0"=>"Love","1"=>"Adore","2"=>"Sexy","3"=>"Gorgeous","4"=>"Beautiful","5"=>"Sweet","6"=>"Stylish","7"=>"Cute","8"=>"Funny","9"=>"Cool","10"=>"Hot"); $c_codes_original=array ( 'AF' => 'Afghanistan', 'AL' => 'Albania', 'DZ' => 'Algeria', 'AS' => 'American Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AI' => 'Anguilla', 'AQ' => 'Antarctica', 'AG' => 'Antigua and Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Austria', 'AZ' => 'Azerbaijan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'Belgium', 'BZ' => 'Belize', 'BJ' => 'Benin', 'BM' => 'Bermuda', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnia and Herzegovina', 'BW' => 'Botswana', 'BV' => 'Bouvet Island', 'BR' => 'Brazil', 'IO' => 'British Indian Ocean Territory', 'BN' => 'Brunei', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'KH' => 'Cambodia', 'CM' => 'Cameroon', 'CA' => 'Canada', 'CV' => 'Cape Verde', 'KY' => 'Cayman Islands', 'CF' => 'Central African Republic', 'TD' => 'Chad', 'CL' => 'Chile', 'CN' => 'China', 'CX' => 'Christmas Island', 'CC' => 'Cocos (Keeling) Islands', 'CO' => 'Colombia', 'KM' => 'Comoros', 'CG' => 'Congo', 'CD' => 'Congo, The Democratic Republic of the', 'CK' => 'Cook Islands', 'CR' => 'Costa Rica', 'HR' => 'Croatia', 'CU' => 'Cuba', 'CY' => 'Cyprus', 'CZ' => 'Czech Republic', 'CI' => 'Côte dIvoire', 'DK' => 'Denmark', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominican Republic', 'TP' => 'East Timor', 'EC' => 'Ecuador', 'EG' => 'Egypt', 'SV' => 'El Salvador', 'GQ' => 'Equatorial Guinea', 'ER' => 'Eritrea', 'EE' => 'Estonia', 'ET' => 'Ethiopia', 'FK' => 'Falkland Islands', 'FO' => 'Faroe Islands', 'FJ' => 'Fiji Islands', 'FI' => 'Finland', 'FR' => 'France', 'GF' => 'French Guiana', 'PF' => 'French Polynesia', 'TF' => 'French Southern territories', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgia', 'DE' => 'Germany', 'GH' => 'Ghana', 'GI' => 'Gibraltar', 'GR' => 'Greece', 'GL' => 'Greenland', 'GD' => 'Grenada', 'GP' => 'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HM' => 'Heard Island and McDonald Islands', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hungary', 'IS' => 'Iceland', 'IN' => 'India', 'ID' => 'Indonesia', 'IR' => 'Iran', 'IQ' => 'Iraq', 'IE' => 'Ireland', 'IL' => 'Israel', 'IT' => 'Italy', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JO' => 'Jordan', 'KZ' => 'Kazakhstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KW' => 'Kuwait', 'KG' => 'Kyrgyzstan', 'LA' => 'Laos', 'LV' => 'Latvia', 'LB' => 'Lebanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libya', 'LI' => 'Liechtenstein', 'LT' => 'Lithuania', 'LU' => 'Luxembourg', 'MO' => 'Macao', 'MK' => 'Macedonia', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Maldives', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshall Islands', 'MQ' => 'Martinique', 'MR' => 'Mauritania', 'MU' => 'Mauritius', 'YT' => 'Mayotte', 'MX' => 'Mexico', 'FM' => 'Micronesia, Federated States of', 'MD' => 'Moldova', 'MC' => 'Monaco', 'MN' => 'Mongolia', 'ME' => 'Montenegro', 'MS' => 'Montserrat', 'MA' => 'Morocco', 'MZ' => 'Mozambique', 'MM' => 'Myanmar', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Netherlands', 'AN' => 'Netherlands Antilles', 'NC' => 'New Caledonia', 'NZ' => 'New Zealand', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'NU' => 'Niue', 'NF' => 'Norfolk Island', 'KP' => 'North Korea', 'MP' => 'Northern Mariana Islands', 'NO' => 'Norway', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papua New Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Philippines', 'PN' => 'Pitcairn', 'PL' => 'Poland', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'RO' => 'Romania', 'RU' => 'Russia', 'RW' => 'Rwanda', 'RE' => 'Réunion', 'SH' => 'Saint Helena', 'KN' => 'Saint Kitts and Nevis', 'PM' => 'Saint Pierre and Miquelon', 'WS' => 'Samoa', 'SM' => 'San Marino', 'ST' => 'Sao Tome and Principe', 'SA' => 'Saudi Arabia', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychelles', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovakia', 'SI' => 'Slovenia', 'SB' => 'Solomon Islands', 'SO' => 'Somalia', 'ZA' => 'South Africa', 'GS' => 'South Georgia and the South Sandwich Islands', 'KR' => 'South Korea', 'ES' => 'Spain', 'LK' => 'Sri Lanka', 'LC' => 'St. Lucia', 'VC' => 'St. Vincent and the Grenadines', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SJ' => 'Svalbard and Jan Mayen', 'SZ' => 'Swaziland', 'SE' => 'Sweden', 'CH' => 'Switzerland', 'SY' => 'Syria', 'TW' => 'Taiwan', 'TJ' => 'Tajikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailand', 'TG' => 'Togo', 'TK' => 'Tokelau', 'TO' => 'Tonga', 'TT' => 'Trinidad and Tobago', 'TN' => 'Tunisia', 'TR' => 'Turkey', 'TM' => 'Turkmenistan', 'TC' => 'Turks and Caicos Islands', 'TV' => 'Tuvalu', 'UK' => 'UK', 'UM' => 'US (Minor Outlying Islands)', 'UG' => 'Uganda', 'UA' => 'Ukraine', 'AE' => 'United Arab Emirates', 'US' => 'United States', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vatican City State', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'VG' => 'Virgin Islands, British', 'VI' => 'Virgin Islands, U.S.', 'WF' => 'Wallis and Futuna', 'EH' => 'Western Sahara', 'YE' => 'Yemen', 'YU' => 'Yugoslavia', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe', ); $c_codes = array( "AF" => "افغانستان", // Afghanistan "NL" => "Nederland", // Netherlands "AN" => "Nederlandse Antillen", // Netherlands Antilles "AL" => "Shqipëria", // Albania "DZ" => "الجزائر", // Algeria "AS" => "American Samoa", // American Samoa "AD" => "Andorra", // Andorra "AO" => "Angola", // Angola "AI" => "Anguilla", // Anguilla "AG" => "Antigua en Barbuda", // Antigua and Barbuda "AE" => "الإمارات العربية المتحدة", // United Arab Emirates "AR" => "Argentina", // Argentina "AM" => "Հայաստան", // Armenia "AW" => "Aruba", // Aruba "AU" => "Australia", // Australia "AZ" => "Azərbaycan", // Azerbaijan "BS" => "The Bahamas", // Bahamas "BH" => "البحرين", // Bahrain "BD" => "বাংলাদেশ", // Bangladesh "BB" => "Barbados", // Barbados "BE" => "België", // Belgium "BZ" => "Belize", // Belize "BJ" => "Bénin", // Benin "BM" => "Bermuda", // Bermuda "BT" => "འབྲུག་ཡུལ", // Bhutan "BO" => "Bolivia", // Bolivia "BA" => "Bosna i Hercegovina", // Bosnia and Herzegovina "BW" => "Botswana", // Botswana "BR" => "Brasil", // Brazil "VG" => "British Virgin Islands", // Virgin Islands, British "BN" => "Brunei", // Brunei "BG" => "България", // Bulgaria "BF" => "Burkina Faso", // Burkina Faso "BI" => "Burundi", // Burundi "KY" => "Cayman Islands", // Cayman Islands "CL" => "Chile", // Chile "CK" => "Cook Islands", // Cook Islands "CR" => "Costa Rica", // Costa Rica "DJ" => "جيبوتي", // Djibouti "DM" => "Dominica", // Dominica "DO" => "República Dominicana", // Dominican Republic "EC" => "Ecuador", // Ecuador "EG" => "مصر", // Egypt "SV" => "El Salvador", // El Salvador "ER" => "إرتريا", // Eritrea "ES" => "España", // Spain "ZA" => "South Africa", // South Africa "ET" => "ኢትዮጵያ", // Ethiopia "FK" => "Falkland Islands", // Falkland Islands "FJ" => "Fiji", // Fiji Islands "PH" => "Philippines", // Philippines "FO" => "Føroyar", // Faroe Islands "GA" => "Gabon", // Gabon "GM" => "Gambia", // Gambia "GE" => "საქართველო", // Georgia "GH" => "Ghana", // Ghana "GI" => "Gibraltar", // Gibraltar "GD" => "Grenada", // Grenada "GL" => "Kalaallit Nunaat", // Greenland "GP" => "Guadeloupe", // Guadeloupe "GU" => "Guam", // Guam "GT" => "Guatemala", // Guatemala "GN" => "Guinée", // Guinea "GW" => "Guiné-Bissau", // Guinea-Bissau "GY" => "Guyana", // Guyana "HT" => "Haïti", // Haiti "HN" => "Honduras", // Honduras "HK" => "香港", // Hong Kong "SJ" => "Svalbard og Jan Mayen", // Svalbard and Jan Mayen "ID" => "Indonesia", // Indonesia "IN" => "भारत", // India "IQ" => "العراق", // Iraq "IR" => "ایران", // Iran "IE" => "Ireland", // Ireland "IS" => "Ísland", // Iceland "IL" => "ישראל", // Israel "IT" => "Italia", // Italy "TP" => "Timor-Leste", // East Timor "AT" => "Österreich", // Austria "JM" => "Jamaica", // Jamaica "JP" => "日本", // Japan "YE" => "اليمن", // Yemen "JO" => "الأردن", // Jordan "CX" => "Christmas Island", // Christmas Island "YU" => "Jugoslavija", // Yugoslavia "KH" => "កម្ពុជា", // Cambodia "CM" => "Cameroun", // Cameroon "CA" => "Canada", // Canada "CV" => "Cabo Verde", // Cape Verde "KZ" => "Қазақстан", // Kazakhstan "KE" => "Kenya", // Kenya "CF" => "République Centrafricaine", // Central African Republic "CN" => "中国", // China "KG" => "Кыргызстан", // Kyrgyzstan "KI" => "Kiribati", // Kiribati "CO" => "Colombia", // Colombia "KM" => "Comores", // Comoros "CG" => "Congo", // Congo "CD" => "Congo, La République Démocratique du", // Congo, The Democratic Republic of the "CC" => "Cocos (Keeling) Islands", // Cocos (Keeling) Islands "KP" => "조선민주주의인민공화국", // North Korea "KR" => "대한민국", // South Korea "GR" => "Ελλάδα", // Greece "HR" => "Hrvatska", // Croatia "CU" => "Cuba", // Cuba "KW" => "الكويت", // Kuwait "CY" => "Κύπρος", // Cyprus "LA" => "ລາວ", // Laos "LV" => "Latvija", // Latvia "LS" => "Lesotho", // Lesotho "LB" => "لبنان", // Lebanon "LR" => "Liberia", // Liberia "LY" => "ليبيا", // Libya "LI" => "Liechtenstein", // Liechtenstein "LT" => "Lietuva", // Lithuania "LU" => "Lëtzebuerg", // Luxembourg "EH" => "الصحراء الغربية", // Western Sahara "MO" => "澳門", // Macao "MG" => "Madagasikara", // Madagascar "MK" => "Македонија", // Macedonia "MW" => "Malawi", // Malawi "MV" => "Maldives", // Maldives "MY" => "Malaysia", // Malaysia "ML" => "Mali", // Mali "MT" => "Malta", // Malta "MA" => "المغرب", // Morocco "MH" => "Marshall Islands", // Marshall Islands "MQ" => "Martinique", // Martinique "MR" => "موريتانيا", // Mauritania "MU" => "Maurice", // Mauritius "YT" => "Mayotte", // Mayotte "MX" => "México", // Mexico "FM" => "Micronesia, Estados Federados de", // Micronesia, Federated States of "MD" => "Moldova", // Moldova "MC" => "Monaco", // Monaco "MN" => "Монгол Улс", // Mongolia "MS" => "Montserrat", // Montserrat "MZ" => "Moçambique", // Mozambique "MM" => "မြန်မာ", // Myanmar "NA" => "Namibië", // Namibia "NR" => "Nauru", // Nauru "NP" => "नेपाल", // Nepal "NI" => "Nicaragua", // Nicaragua "NE" => "Niger", // Niger "NG" => "Nigeria", // Nigeria "NU" => "Niue", // Niue "NF" => "Norfolk Island", // Norfolk Island "NO" => "Norge", // Norway "CI" => "Côte d'Ivoire", // Côte dIvoire "OM" => "عمان", // Oman "PK" => "پاکستان", // Pakistan "PW" => "Palau", // Palau "PA" => "Panamá", // Panama "PG" => "Papua New Guinea", // Papua New Guinea "PY" => "Paraguay", // Paraguay "PE" => "Perú", // Peru "PN" => "Pitcairn", // Pitcairn "MP" => "Northern Mariana Islands", // Northern Mariana Islands "PT" => "Portugal", // Portugal "PR" => "Puerto Rico", // Puerto Rico "PL" => "Polska", // Poland "GQ" => "Guinea Ecuatorial", // Equatorial Guinea "QA" => "قطر", // Qatar "FR" => "France", // France "GF" => "Guyane française", // French Guiana "PF" => "Polynésie française", // French Polynesia "RE" => "Réunion", // Réunion "RO" => "România", // Romania "RW" => "Rwanda", // Rwanda "SE" => "Sverige", // Sweden "SH" => "Saint Helena", // Saint Helena "KN" => "Saint Kitts en Nevis", // Saint Kitts and Nevis "LC" => "Saint Lucia", // St. Lucia "VC" => "Saint Vincent en de Grenadines", // St. Vincent and the Grenadines "PM" => "Saint-Pierre en Miquelon", // Saint Pierre and Miquelon "DE" => "Deutschland", // Germany "RS" => "Србија", // Serbia "ME" => "Црна Гора", // Montenegro "SB" => "Solomon Islands", // Solomon Islands "ZM" => "Zambia", // Zambia "WS" => "Samoa", // Samoa "SM" => "San Marino", // San Marino "ST" => "São Tomé en Príncipe", // Sao Tome and Principe "SA" => "المملكة العربية السعودية", // Saudi Arabia "SN" => "Sénégal", // Senegal "SC" => "Seychelles", // Seychelles "SL" => "Sierra Leone", // Sierra Leone "SG" => "Singapore", // Singapore "SK" => "Slovensko", // Slovakia "SI" => "Slovenija", // Slovenia "SO" => "Soomaaliya", // Somalia "LK" => "ශ්රී ලංකාව", // Sri Lanka "SD" => "السودان", // Sudan "FI" => "Suomi", // Finland "SR" => "Suriname", // Suriname "SZ" => "eSwatini", // Swaziland "CH" => "Schweiz", // Switzerland "SY" => "سوريا", // Syria "TJ" => "Тоҷикистон", // Tajikistan "TW" => "台灣", // Taiwan "TZ" => "Tanzania", // Tanzania "DK" => "Danmark", // Denmark "TH" => "ประเทศไทย", // Thailand "TG" => "Togo", // Togo "TK" => "Tokelau", // Tokelau "TO" => "Tonga", // Tonga "TT" => "Trinidad en Tobago", // Trinidad and Tobago "TD" => "Tchad", // Chad "CZ" => "Česká republika", // Czech Republic "TN" => "تونس", // Tunisia "TR" => "Türkiye", // Turkey "TM" => "Türkmenistan", // Turkmenistan "TC" => "Turks- en Caicoseilanden", // Turks and Caicos Islands "TV" => "Tuvalu", // Tuvalu "UG" => "Uganda", // Uganda "UA" => "Україна", // Ukraine "HU" => "Magyarország", // Hungary "UY" => "Uruguay", // Uruguay "NC" => "Nouvelle-Calédonie", // New Caledonia "NZ" => "New Zealand", // New Zealand "UZ" => "O‘zbekiston", // Uzbekistan "BY" => "Беларусь", // Belarus "WF" => "Wallis en Futuna", // Wallis and Futuna "VU" => "Vanuatu", // Vanuatu "VA" => "Città del Vaticano", // Vatican City State "VE" => "Venezuela", // Venezuela "RU" => "Россия", // Russia "VN" => "Việt Nam", // Vietnam "EE" => "Eesti", // Estonia "US" => "United States", // United States "VI" => "Virgin Islands, U.S.", // Virgin Islands, U.S. "ZW" => "Zimbabwe", // Zimbabwe "PS" => "فلسطين", // Palestine "AQ" => "Antarctica", // Antarctica "BV" => "Bouvet Island", // Bouvet Island "IO" => "British Indian Ocean Territory", // British Indian Ocean Territory "GS" => "South Georgia en de South Sandwich Islands", // South Georgia and the South Sandwich Islands "HM" => "Heard Island en McDonald Islands", // Heard Island and McDonald Islands "TF" => "Franse Zuidelijke en Antarctische Gebieden", // French Southern territories "UK" => "UK", // UK "UM" => "US (Minor Outlying Islands)" // US (Minor Outlying Islands) ); $c_codes_es = [ "AR" => "Argentina", "BO" => "Bolivia", "CL" => "Chile", "CO" => "Colombia", "CR" => "Costa Rica", "CU" => "Cuba", "DO" => "República Dominicana", "EC" => "Ecuador", "SV" => "El Salvador", "GT" => "Guatemala", "HN" => "Honduras", "MX" => "México", "NI" => "Nicaragua", "PA" => "Panamá", "PY" => "Paraguay", "PE" => "Perú", "ES" => "España", "UY" => "Uruguay", "VE" => "Venezuela" ]; function getage($bMonth,$bDay,$bYear) { if($bDay > 0){ list($cYear, $cMonth, $cDay) = explode("-", date("Y-m-d")); return ( ($cMonth >= $bMonth && $cDay >= $bDay) || ($cMonth > $bMonth) ) ? $cYear - $bYear : $cYear - $bYear - 1; } } function calculateZodiacSign($day, $month) { // Initialize the zodiac sign variable $zodiacSign = "Unknown"; // Validate the month and day if ($month < 1 || $month > 12 || $day < 1 || $day > 31) { return "Invalid date"; } // Determine the zodiac sign based on month and day if (($month == 3 && $day > 20) || ($month == 4 && $day < 20)) { $zodiacSign = "Aries"; } elseif (($month == 4 && $day > 19) || ($month == 5 && $day < 21)) { $zodiacSign = "Taurus"; } elseif (($month == 5 && $day > 20) || ($month == 6 && $day < 21)) { $zodiacSign = "Gemini"; } elseif (($month == 6 && $day > 20) || ($month == 7 && $day < 23)) { $zodiacSign = "Cancer"; } elseif (($month == 7 && $day > 22) || ($month == 8 && $day < 23)) { $zodiacSign = "Leo"; } elseif (($month == 8 && $day > 22) || ($month == 9 && $day < 23)) { $zodiacSign = "Virgo"; } elseif (($month == 9 && $day > 22) || ($month == 10 && $day < 23)) { $zodiacSign = "Libra"; } elseif (($month == 10 && $day > 22) || ($month == 11 && $day < 22)) { $zodiacSign = "Scorpio"; } elseif (($month == 11 && $day > 21) || ($month == 12 && $day < 22)) { $zodiacSign = "Sagittarius"; } elseif (($month == 12 && $day > 21) || ($month == 1 && $day < 20)) { $zodiacSign = "Capricorn"; } elseif (($month == 1 && $day > 19) || ($month == 2 && $day < 19)) { $zodiacSign = "Aquarius"; } elseif (($month == 2 && $day > 18) || ($month == 3 && $day < 21)) { $zodiacSign = "Pisces"; } return $zodiacSign; } function makeClickableLinks($text) { $text = preg_replace_callback('/\B#(\w*[a-z0-9_-]+\w*)/i', 'hashtag_to_link', $text); return preg_replace_callback('/((((f|ht)tp(s)?:\/\/)|www)[-a-zA-Z?-??-?()0-9@:%_+.~#$?&;\/\/=]+)/i', function($matches) { if (substr($matches[0], 0 , 4) == 'www.') { // The match starts with www., add a protocol (http:// being the most common). $matches[0] = 'http://' . $matches[0]; } return '' . $matches[0] . ''; }, $text); foreach($matches as $var){ #if(strstr($var,"jpg") || strstr($var,"jpeg") || strstr($var,"gif") || strstr($var,"png")){ # $text .= ''; #} if(strstr($var[0],"youtube")){ $queryString = parse_url($var[0], PHP_URL_QUERY); parse_str($queryString, $params); if (isset($params['v'])) { $text .= ' '; } } } return $text; } function hashtag_to_link($matches) { return '' . $matches[0] . ''; } function formatlinks($text){ preg_match_all('#\bhttps?://[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))#', $text, $matches); foreach($matches as $var){ if(strstr($var[0],"youtube")){ $queryString = parse_url($var[0], PHP_URL_QUERY); parse_str($queryString, $params); if (isset($params['v'])) { $text .= ' '; } } } return $text; } function embedyoutube($link,$options=""){ $yid = get_youtube_video_ID($link); $video = '
'; return $video; } function get_youtube_video_ID($youtube_video_url) { /** * Pattern matches * http://youtu.be/ID * http://www.youtube.com/embed/ID * http://www.youtube.com/watch?v=ID * http://www.youtube.com/?v=ID * http://www.youtube.com/v/ID * http://www.youtube.com/e/ID * http://www.youtube.com/user/username#p/u/11/ID * http://www.youtube.com/leogopal#p/c/playlistID/0/ID * http://www.youtube.com/watch?feature=player_embedded&v=ID * http://www.youtube.com/?feature=player_embedded&v=ID */ $pattern = '%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i'; // Checks if it matches a pattern and returns the value if (preg_match("/^(?:http(?:s)?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com\/(?:(?:watch)?\?(?:.*&)?v(?:i)?=|(?:embed|v|vi|user)\/))([^\?&\"'>]+)/", $youtube_video_url, $matches)) { return $matches; } // if no match return false. return false; } function get_time_ago($time_stamp) { $time_difference = strtotime('now') - $time_stamp; $units = [ 'ano' => 60 * 60 * 24 * 365.242199, 'mes' => 60 * 60 * 24 * 30.4368499, 'semana' => 60 * 60 * 24 * 7, 'dia' => 60 * 60 * 24, 'hora' => 60 * 60, 'minuto' => 60 ]; foreach ($units as $unit_name => $unit) { if ($time_difference >= $unit) { $num = floor($time_difference / $unit); return 'hace '.$num . ' ' . ($num > 1 ? $unit_name . 's' : $unit_name) . ''; } } return 'justamente ahora'; } function get_time_ago_string($time_stamp, $divisor, $time_unit) { $time_difference = strtotime("now") - $time_stamp; $time_units = floor($time_difference / $divisor); settype($time_units, 'string'); if ($time_units === '0') { return '1 minuto '; } elseif ($time_units === '1') { return '1 ' . $time_unit . 's '; } else { /* * More than "1" $time_unit. This is the "plural" message. */ // TODO: This pluralizes the time unit, which is done by adding "s" at the end; this will not work for i18n! return $time_units . ' ' . $time_unit . ''; } } function insert_notify($toid,$notifymsg,$notifyurl){ global $pdodb; if($_SESSION["uid"] > 0){ $fromid = $_SESSION["uid"]; }else{ $fromid = 1; } $stmt2 = $pdodb->prepare("INSERT INTO notifications(notifymsg,notifyurl,fromid,toid,whenpost) VALUES(:notifymsg ,:notifyurl,:fromid,:toid,now()) "); $stmt2->bindParam(':fromid',$fromid,PDO::PARAM_INT); $stmt2->bindParam(':toid',$toid); $stmt2->bindParam(':notifyurl',$notifyurl); $stmt2->bindParam(':notifymsg',$notifymsg); $stmt2->execute(); $stmt = $pdodb->prepare("UPDATE LOW_PRIORITY girls SET nnotify=nnotify+1 WHERE ID=:toid LIMIT 1"); $stmt->bindParam(':toid',$toid); $stmt->execute(); } function alert($text){ } function analyzetext($text){ return $text; } function is_ani($filename) { if(!($fh = @fopen($filename, 'rb'))) return false; $count = 0; //an animated gif contains multiple "frames", with each frame having a //header made up of: // * a static 4-byte sequence (\x00\x21\xF9\x04) // * 4 variable bytes // * a static 2-byte sequence (\x00\x2C) // We read through the file til we reach the end of the file, or we've found // at least 2 frame headers while(!feof($fh) && $count < 2) { $chunk = fread($fh, 1024 * 100); //read 100kb at a time $count += preg_match_all('#\x00\x21\xF9\x04.{4}\x00\x2C#s', $chunk, $matches); } fclose($fh); return $count > 1; } function getuserdata($userid){ global $pdodb; $getuserinfo = $pdodb->prepare("SELECT emailis,username FROM girls WHERE ID=:userid LIMIT 1"); $getuserinfo->bindParam(':userid',$userid); $getuserinfo->execute(); while($i3=$getuserinfo->fetch()) { $data["email"] = $i3["emailis"]; $data["username"] = $i3["username"]; } return $data; } function getUrlName($utf8Name) { $urlName = $utf8Name; $zeichen = Array("/ä/","/ö/","/ü/","/Ä/","/Ö/","/Ü/","/ß/","/ /","/\./"); $replace = Array("ae","oe","ue","Ae","Oe","Ue","ss","-","-"); $urlName = preg_replace($zeichen, $replace, $urlName); $urlName = preg_replace("/[^a-zA-Z0-9_-]/" , "" , $urlName); $zeichen = Array("/---/","/--/"); $replace = Array("-","-"); $urlName = preg_replace($zeichen, $replace, $urlName); $urlName = substr(strtolower($urlName), 0, 100); $urlName = trim($urlName, "-"); return $urlName; } function updatefollowercount($whoid){ global $pdodb; $stmt = $pdodb->prepare("SELECT ID FROM followers WHERE toid=:toid"); $stmt->bindParam(':toid',$whoid,PDO::PARAM_INT); $stmt->execute(); $nfollowers = $stmt->rowCount(); $stmt = $pdodb->prepare("SELECT ID FROM followers WHERE fromid=:fromid"); $stmt->bindParam(':fromid',$whoid,PDO::PARAM_INT); $stmt->execute(); $nfollowing = $stmt->rowCount(); $stmt = $pdodb->prepare("UPDATE LOW_PRIORITY girls SET tfollowers=:nfollowers, tfollowing=:nfollowing WHERE ID=:updateid"); $stmt->bindParam(':updateid',$whoid,PDO::PARAM_INT); $stmt->bindParam(':nfollowers',$nfollowers,PDO::PARAM_INT); $stmt->bindParam(':nfollowing',$nfollowing,PDO::PARAM_INT); $stmt->execute(); } function save_rseo_nofollow($content) { $content2 = preg_replace_callback('~<(a\s[^>]+)>~isU', "cb2", $content); return $content2; } function cb2($match) { list($original, $tag) = $match; // regex match groups if (stripos($tag, "nofollow")) { return $original; }else { return "<$tag rel='nofollow'>"; } } function neat_trim($str, $n, $delim='…') { $len = strlen($str); if ($len > $n) { preg_match('/(.{' . $n . '}.*?)\b/', $str, $matches); return rtrim($matches[1]) . $delim; } else { return $str; } } function getGeoCode($address) { global $googleapikey; global $geocode; // Eingabe: Adresse, z.B. 1600 Amphitheatre Parkway Mountain View, CA // Ausgabe: Lat und Lon global $language; $language = "en"; $address = urlencode($address); # $url = "https://maps.googleapis.com/maps/api/geocode/json?address=$address&language=$language&sensor=true&key=$googleapikey"; $url = "https://us1.locationiq.com/v1/search.php?key=".$geocode."&q=".$address."&format=json"; #echo $url; $results = file_get_contents_curl($url); #print_r($results); $results = json_decode($results,1); /* $n_address_items = sizeOf($results["results"][0]["address_components"]); for($i=0;$i<$n_address_items;$i++) { $tmp = $results["results"][0]["address_components"][$i]["types"][0]; if($tmp=="locality"){ $city = $results["results"][0]["address_components"][$i]["long_name"]; } } */ #$geoCode["city"] = $city; # $geoCode["lat"] = $results["results"][0]["geometry"]["location"]["lat"]; # $geoCode["lon"] = $results["results"][0]["geometry"]["location"]["lng"]; #$geoCode["city"] = $city; $geoCode["lat"] = $results[0]["lat"]; $geoCode["lon"] = $results[0]["lon"]; return $geoCode; } function file_get_contents_curl($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser. curl_setopt($ch, CURLOPT_URL, $url); $data = curl_exec($ch); curl_close($ch); return $data; } function cleanstring($string) { $c = mb_detect_encoding($string, mb_detect_order(), true); $string = iconv($c, 'ASCII//TRANSLIT',$string); $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens. $string = str_replace('/', '-', $string); // Replaces all spaces with hyphens. $string = preg_replace('/[^A-Za-z0-9\-üÜöÖäÄ]/', '', $string); // Removes special chars. return preg_replace('/-+/', '-', $string); // Replaces multiple hyphens with single one. } function unaccent($string) { if (strpos($string = htmlentities($string, ENT_QUOTES, 'UTF-8'), '&') !== false) { $string = html_entity_decode(preg_replace('~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|tilde|uml);~i', '$1', $string), ENT_QUOTES, 'UTF-8'); } return $string; } function unsubscribe($cid){ global $pdodb; $stmt = $pdodb->prepare("DELETE FROM subscribeto WHERE cid=:cid AND mid=:mid LIMIT 1"); $stmt->bindParam(':cid',$cid); $stmt->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT); $stmt->execute(); $stmt3 = $pdodb->prepare("SELECT ID FROM subscribeto WHERE cid=:cid"); $stmt3->bindParam(':cid',$cid); $stmt3->execute(); $nmembers = $stmt3->rowCount(); $stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY forums SET nmembers=:nmembers WHERE ID=:cid"); $stmt2->bindParam(':cid',$cid); $stmt2->bindParam(':nmembers',$nmembers); $stmt2->execute(); echo 'unsubscribed'; } function subscribeto($cid){ global $pdodb; $stmt = $pdodb->prepare("SELECT ID FROM subscribeto WHERE cid=:cid AND mid=:mid LIMIT 1"); $stmt->bindParam(':cid',$cid); $stmt->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT); $stmt->execute(); if($stmt->rowCount() == 0){ $stmt2 = $pdodb->prepare("INSERT INTO subscribeto(cid,mid) VALUES(:cid ,:mid) "); $stmt2->bindParam(':cid',$cid); $stmt2->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT); $stmt2->execute(); echo 'now subscribed'; $stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY girls SET subscriptions=subscriptions+1 WHERE ID=:cid"); $stmt2->bindParam(':cid',$_SESSION["uid"]); $stmt2->execute(); $stmt3 = $pdodb->prepare("SELECT ID FROM subscribeto WHERE cid=:cid"); $stmt3->bindParam(':cid',$cid); $stmt3->execute(); $nmembers = $stmt3->rowCount(); $stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY forums SET nmembers=:nmembers WHERE ID=:cid"); $stmt2->bindParam(':cid',$cid); $stmt2->bindParam(':nmembers',$nmembers); $stmt2->execute(); }else{ echo 'already joined'; } $stmt3 = $pdodb->prepare("SELECT ID FROM subscribeto WHERE cid=:cid"); $stmt3->bindParam(':cid',$cid); $stmt3->execute(); $nmembers = $stmt3->rowCount(); $stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY forums SET nmembers=:nmembers WHERE ID=:cid"); $stmt2->bindParam(':cid',$cid); $stmt2->bindParam(':nmembers',$nmembers); $stmt2->execute(); } function linkfound($str){ if(strstr($str,".com") || strstr($str,".de") || strstr($str,"http://") || strstr($str,"https://")){ return true; }else{ return false; } } function mailq($emailis,$title,$desc,$pid){ global $pdodb; $stmt = $pdodb->prepare("INSERT IGNORE INTO mailq (emailis, titleis,mid,msgis,pid) VALUES(:emailis, :titleis,:mid,:descis,:pid)"); $stmt->bindParam(':titleis',$title); $stmt->bindParam(':emailis',$emailis); $stmt->bindParam(':descis',$desc); $stmt->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT); $stmt->bindParam(':pid',$pid,PDO::PARAM_INT); $stmt->execute(); } function unique_multidim_array($array, $key) { $temp_array = array(); $i = 0; $key_array = array(); foreach($array as $val) { if (!in_array($val[$key], $key_array)) { $key_array[$i] = $val[$key]; $temp_array[$i] = $val; } $i++; } return $temp_array; } function socketlabs($to2, $subject2, $message2) { #echo 'using socketlabs'; $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPKeepAlive = true; $mail->Priority = 1; $mail->SMTPDebug = 0; $mail->Timeout = 45; // set mailer to use SMTP $mail->Host = "smtp.sendgrid.net"; // specify main and backup server $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Port = 587; $mail->Username = "apikey"; // SMTP username $mail->Password = "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"; // SMTP password $mail->From = "info@guapas.org"; $mail->FromName = "guapas.org"; $mail->AddAddress($to2, "guapas.org"); // $mail->AddAddress("ellen@example.com"); // name is optional $mail->AddReplyTo("info@guapas.org", "guapas.org"); $mail->SetFrom("info@guapas.org","guapas.org", 0); //$mail->WordWrap = 50; // set word wrap to 50 characters //$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments //$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name //$mail->IsHTML(true); // set email format to HTML $message2 .= " =============================================== Telegram Channel: https://www.t.me/misskicom "; $mail->Subject = $subject2; $mail->Body = $message2; //$mail->AltBody = $message2; //echo $to2; if(!$mail->Send()) { echo "Message could not be sent.";
echo "Mailer Error: " . $mail->ErrorInfo;
}else{
#echo 'message sent '.$to2;
}
}
function unsubscribetopage($cid){
global $pdodb;
$stmt = $pdodb->prepare("DELETE FROM pagesubscriptions WHERE cid=:cid AND mid=:mid LIMIT 1");
$stmt->bindParam(':cid',$cid);
$stmt->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT);
$stmt->execute();
$stmt3 = $pdodb->prepare("SELECT ID FROM pagesubscriptions WHERE cid=:cid");
$stmt3->bindParam(':cid',$cid);
$stmt3->execute();
$nmembers = $stmt3->rowCount();
$stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY forums SET nmembers=:nmembers WHERE ID=:cid");
$stmt2->bindParam(':cid',$cid);
$stmt2->bindParam(':nmembers',$nmembers);
$stmt2->execute();
echo 'unsubscribed';
}
function subscribetopage($cid){
global $pdodb;
$stmt = $pdodb->prepare("SELECT ID FROM pagesubscriptions WHERE pageid=:cid AND mid=:mid LIMIT 1");
$stmt->bindParam(':cid',$cid);
$stmt->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT);
$stmt->execute();
if($stmt->rowCount() == 0){
$stmt2 = $pdodb->prepare("INSERT INTO pagesubscriptions(pageid,mid) VALUES(:cid ,:mid) ");
$stmt2->bindParam(':cid',$cid);
$stmt2->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT);
$stmt2->execute();
echo 'now subscribed';
$stmt3 = $pdodb->prepare("SELECT ID FROM pagesubscriptions WHERE pageid=:cid");
$stmt3->bindParam(':cid',$cid);
$stmt3->execute();
$nmembers = $stmt3->rowCount();
$stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY pages SET subscribers=:nmembers WHERE ID=:cid");
$stmt2->bindParam(':cid',$cid);
$stmt2->bindParam(':nmembers',$nmembers);
$stmt2->execute();
}else{
echo 'already joined';
}
$stmt3 = $pdodb->prepare("SELECT ID FROM pagesubscriptions WHERE pageid=:cid");
$stmt3->bindParam(':cid',$cid);
$stmt3->execute();
$nmembers = $stmt3->rowCount();
$stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY pages SET subscribers=:nmembers WHERE ID=:cid");
$stmt2->bindParam(':cid',$cid);
$stmt2->bindParam(':nmembers',$nmembers);
$stmt2->execute();
}
function addtip($toid,$amount){
global $pdodb;
#echo 'addtip';
$stmt2 = $pdodb->prepare("INSERT INTO tipsreceived(fromid,toid,howmuch,whentip) VALUES(:fromid,:toid,:howmuch,now())");
$stmt2->bindParam(':fromid',$_SESSION["uid"]);
$stmt2->bindParam(':toid',$toid);
$stmt2->bindParam(':howmuch',$amount);
$stmt2->execute();
}
function unjoingroup($cid){
global $pdodb;
$stmt = $pdodb->prepare("DELETE FROM groupsubs WHERE groupid=:cid AND mid=:mid LIMIT 1");
$stmt->bindParam(':cid',$cid);
$stmt->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT);
$stmt->execute();
$stmt3 = $pdodb->prepare("SELECT ID FROM groupsubs WHERE groupid=:cid");
$stmt3->bindParam(':cid',$cid);
$stmt3->execute();
$nmembers = $stmt3->rowCount();
$stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY groups SET nsubs=:nmembers WHERE ID=:cid");
$stmt2->bindParam(':cid',$cid);
$stmt2->bindParam(':nmembers',$nmembers);
$stmt2->execute();
echo 'subscribed';
}
function joingroup($cid){
global $pdodb;
$stmt = $pdodb->prepare("SELECT ID FROM groupsubs WHERE groupid=:cid AND mid=:mid LIMIT 1");
$stmt->bindParam(':cid',$cid);
$stmt->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT);
$stmt->execute();
if($stmt->rowCount() == 0){
$stmt2 = $pdodb->prepare("INSERT INTO groupsubs(groupid,mid) VALUES(:cid ,:mid) ");
$stmt2->bindParam(':cid',$cid);
$stmt2->bindParam(':mid',$_SESSION["uid"],PDO::PARAM_INT);
$stmt2->execute();
echo 'now subscribed';
#$stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY girls SET subscriptions=subscriptions+1 WHERE ID=:cid");
#$stmt2->bindParam(':cid',$_SESSION["uid"]);
#$stmt2->execute();
$stmt3 = $pdodb->prepare("SELECT ID FROM groupsubs WHERE groupid=:cid");
$stmt3->bindParam(':cid',$cid);
$stmt3->execute();
$nmembers = $stmt3->rowCount();
$stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY groups SET nsubs=:nmembers WHERE ID=:cid");
$stmt2->bindParam(':cid',$cid);
$stmt2->bindParam(':nmembers',$nmembers);
$stmt2->execute();
}else{
echo 'already joined';
}
$stmt3 = $pdodb->prepare("SELECT ID FROM subscribeto WHERE cid=:cid");
$stmt3->bindParam(':cid',$cid);
$stmt3->execute();
$nmembers = $stmt3->rowCount();
$stmt2 = $pdodb->prepare("UPDATE LOW_PRIORITY forums SET nmembers=:nmembers WHERE ID=:cid");
$stmt2->bindParam(':cid',$cid);
$stmt2->bindParam(':nmembers',$nmembers);
$stmt2->execute();
}
function influencepoint($mid,$points=1){
global $pdodb;
$stmt2 = $pdodb->prepare("INSERT IGNORE INTO influencers(mid, daypoints,weekpoints) VALUES(:mid,:daypoints,:weekpoints) ON DUPLICATE KEY UPDATE daypoints=daypoints+:daypoints,weekpoints=weekpoints+:daypoints");
$stmt2->bindParam(':mid',$mid);
$stmt2->bindParam(':daypoints',$points);
$stmt2->bindParam(':weekpoints',$points);
$stmt2->execute();
}
function todo(){
global $d_verified;
$i[] = 'Share your profile in the Miss ranky contest';
$i[] = 'Write in your own Blog';
$i[] = 'Write in your own group';
$i[] = 'Post a Status';
$i[] = 'Post a Classified';
if($d_verified <> 1){
$i[] = 'Get Verified';
}
$randkey = array_rand($i,1);
return $i[$randkey];
}
function cmtofeet($cm) {
$inches = ceil($cm/2.54);
$feet = floor(($inches/12));
$measurement = $feet."' ".($inches%12).'"';
return $measurement;
}
function mask_email($email, $char_shown_front = 1, $char_shown_back = 1)
{
$mail_parts = explode('@', $email);
$username = $mail_parts[0];
$len = strlen($username);
if ($len < $char_shown_front or $len < $char_shown_back) {
return implode('@', $mail_parts);
}
//Logic: show asterisk in middle, but also show the last character before @
$mail_parts[0] = substr($username, 0, $char_shown_front)
. str_repeat('*', $len - $char_shown_front - $char_shown_back)
. substr($username, $len - $char_shown_back, $char_shown_back);
return implode('@', $mail_parts);
}
function firstwords($str,$words=2,$del="-"){
$str = preg_replace('/[^A-Za-z0-9\- ]/', '', $str);
$str = htmlspecialchars($str);
$split = explode(" ",trim($str));
for($i=0;$i<$words;$i++){
$sentence .= $split[$i].$del;
}
$sentence = rtrim($sentence, $del);
return $sentence;
}
function lastword($str){
$str2 = explode(' ', $str);
$str2 = array_pop($str2);
return $str2;
}
function hashclick($text){
#$text = eregi_replace('@([_0-9a-z-]+)',' @\\1', $text);
return $text;
}
function langtime($time){
global $la;
$newstr = $time;
if($la == "de"){
$newstr = str_replace("hodiny","Stunde her",$newstr);
$newstr = str_replace("hodiny","Stunden her",$newstr);
$newstr = str_replace("Měsíce","Monat her",$newstr);
$newstr = str_replace("Měsíce","Monate her",$newstr);
$newstr = str_replace("minuty","Minute her",$newstr);
$newstr = str_replace("minuty","Minuten her",$newstr);
return $newstr;
}elseif($la == "es"){
$newstr = str_replace("hodiny","hora",$newstr);
$newstr = str_replace("hodiny","horas",$newstr);
$newstr = str_replace("Měsíce","mes",$newstr);
$newstr = str_replace("Měsíce","meses",$newstr);
$newstr = str_replace("minuty","minuto",$newstr);
$newstr = str_replace("minuty","minutos",$newstr);
return $newstr;
}else{
return $time;
}
}
function getHashtags($string) {
$hashtags= FALSE;
preg_match_all("/(#\w+)/u", $string, $matches);
if ($matches) {
$hashtagsArray = array_count_values($matches[0]);
$hashtags = array_keys($hashtagsArray);
}
return $hashtags;
}
function randomuser() {
$alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
$pass = array(); //remember to declare $pass as an array
$alphaLength = strlen($alphabet) - 1; //put the length -1 in cache
for ($i = 0; $i < 8; $i++) {
$n = rand(0, $alphaLength);
$pass[] = $alphabet[$n];
}
return implode($pass); //turn the array into a string
}
function randomPassword() {
$alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
$pass = array(); //remember to declare $pass as an array
$alphaLength = strlen($alphabet) - 1; //put the length -1 in cache
for ($i = 0; $i < 8; $i++) {
$n = rand(0, $alphaLength);
$pass[] = $alphabet[$n];
}
return implode($pass); //turn the array into a string
}
function milestokm($miles){
$ratio = 1.609344;
$kms = $miles * $ratio;
return round($kms);
}
function replaceAnchorTags($text) {
// This pattern matches tags with any attributes and captures the text between and
$anchorPattern = '/]*>(.*?)<\/a>/i';
$replacement = 'you have to login to see the url';
return preg_replace($anchorPattern, $replacement, $text);
}
function estimateReadingTime($text, $wpm = 200) {
// Count the number of words in the text
$wordCount = str_word_count($text);
// Calculate the reading time
$readingTime = ceil($wordCount / $wpm);
return $readingTime;
}
function generateYouTubeEmbedCode($url) {
// Extract video ID from various YouTube URL formats
preg_match('/(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]{11})/i', $url, $matches);
$videoId = $matches[1];
return '
please provide estebrasil username and link to one of your social media accounts or websites on another website
banned accounts are marked for deletion within 30 days
Contest reset!