function get_bitly_long_url($url, $login, $appkey, $format = 'txt') { $connectURL = 'http://api.bit.ly/v3/expand?login='******'&apiKey=' . $appkey . '&shortUrl=' . urlencode($url) . '&format=' . $format; return curl_get_result($connectURL); }
function getMyLocal($ip = '') { $ips = $ip == '' ? getIP() : $ip; $sXML = curl_get_result("http://www.geoplugin.net/xml.gp?ip=" . $ips); $oXML = new SimpleXMLElement($sXML); $fetch_status = $oXML->geoplugin_status; $list = array('country_code' => 'N/A', 'country_name' => 'N/A', 'city_name' => 'N/A', 'region_code' => 'N/A', 'region_name' => 'N/A'); /* Code */ if ($fetch_status == 200) { $list = array('country_code' => $oXML->geoplugin_countryCode, 'country_name' => $oXML->geoplugin_countryName, 'city_name' => $oXML->geoplugin_city, 'region_code' => $oXML->geoplugin_regionCode, 'region_name' => $oXML->geoplugin_regionName); } return $list; }
function shortLink($url, $login, $appkey, $format = 'txt') { //include config for bit.ly credentials $connectURL = 'http://api.bit.ly/v3/shorten?login='******'&apiKey=' . $appkey . '&uri=' . urlencode($url) . '&format=' . $format; $results = curl_get_result($connectURL); return $results; }
} if (!isset($_POST['lethe_admin_url']) || empty($_POST['lethe_admin_url'])) { $errors .= '* Please Enter Your Lethe Admin URL<br>'; } else { define('lethe_admin_url', $_POST['lethe_admin_url']); } if (!isset($_POST['lethe_theme']) || empty($_POST['lethe_theme'])) { $errors .= '* Please Choose a Theme<br>'; } if (!isset($_POST['lethe_license_key']) || empty($_POST['lethe_license_key'])) { $errors .= '* Please Enter a License Key<br>'; } else { if (!_iscurl()) { $errors .= '* cURL extension not active on your server!<br>'; } else { $licenseVerify = curl_get_result('http://www.newslether.com/resources/feeds/lethe.license.php?key=' . urlencode(trim($_POST['lethe_license_key']))); if ($licenseVerify != 'VALID_LICENSE') { $errors .= '* Invalid License Key<br>'; } } } if (!isset($_POST['lethe_google_recaptcha_public']) || empty($_POST['lethe_google_recaptcha_public'])) { $_POST['lethe_google_recaptcha_public'] = 'RECAPTCHA_PUBLIC_KEY'; } if (!isset($_POST['lethe_google_recaptcha_private']) || empty($_POST['lethe_google_recaptcha_private'])) { $_POST['lethe_google_recaptcha_private'] = 'RECAPTCHA_PRIVATE_KEY'; } $_POST['lethe_debug_mode'] = ''; $_POST['lethe_system_notices'] = 'YES'; $_POST['lethe_sidera_helper'] = 'YES'; $_POST['lethe_save_tree_on'] = 'YES';
function bitly($url, $login, $appkey, $format = 'txt') { $connectURL = 'http://api.bit.ly/v3/shorten?login='******'&apiKey=' . $appkey . '&uri=' . urlencode($url) . '&format=' . $format; return curl_get_result($connectURL); }
$mail->DKIM_private = LETHE_KEY_STORE . DIRECTORY_SEPARATOR . $this->sub_dkim_private; } $mail->SetLanguage("tr", 'language/'); $mail->Priority = 3; $mail->Encoding = 'base64'; $mail->CharSet = "utf-8"; if ($this->sub_mail_type == 0) { $mail->IsHTML(true); $mail->ContentType = "text/html"; } else { $mail->ContentType = "text/plain"; } $mail->SetFrom($this->sub_from_mail, $name = $this->sub_from_title); $mail->AddReplyTo($this->sub_reply_mail, $this->sub_from_title); if ($this->sub_mail_attach != '') { $attData = curl_get_result($this->sub_mail_attach); if ($attData === false) { # File Error } else { $mail->AddStringAttachment($attData, basename($this->sub_mail_attach), $encoding = 'base64', $type = 'application/octet-stream'); } } # ** Receivers foreach ($this->sub_mail_receiver as $key => $value) { # ************************************************************************* /* Clear Mails */ $mail->clearAddresses(); $mail->clearCustomHeaders(); $mail->clearAllRecipients(); $mail->AddAddress($key, $value['name']); $mail->addCustomHeader("X-Lethe-Receiver: " . $key);