本文整理汇总了PHP中convert_uuencode函数的典型用法代码示例。如果您正苦于以下问题:PHP convert_uuencode函数的具体用法?PHP convert_uuencode怎么用?PHP convert_uuencode使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了convert_uuencode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: encodePassword
public static function encodePassword($password)
{
$password = convert_uuencode($password);
$password = base64_encode($password);
$password = str_rot13($password);
return $password;
}
示例2: handleRequest
/**
* handles the incoming reqest and prepares the response array
*/
public function handleRequest()
{
if (isset($_POST['input-text']) && isset($_POST['output-encoding']) && isset($_POST['input-encoding'])) {
$this->response['inputenc'] = $_POST['input-encoding'];
$this->response['inputtext'] = stripslashes($_POST['input-text']);
$this->response['outputenc'] = $_POST['output-encoding'];
if ($this->response['outputenc'] == 'PUNYCODE') {
$this->response['outputtext'] = $this->punyencode($this->response['inputtext'], $this->response['inputenc']);
} else {
if ($this->response['inputenc'] == 'PUNYCODE') {
$this->response['outputtext'] = $this->punydecode($this->response['inputtext']);
} else {
if ($this->response['outputenc'] == 'UUENCODE') {
$this->response['outputtext'] = convert_uuencode($this->response['inputtext']);
} else {
if ($this->response['inputenc'] == 'UUENCODE') {
$this->response['outputtext'] = convert_uudecode($this->response['inputtext']);
} else {
$this->response['outputtext'] = mb_convert_encoding($this->response['inputtext'], $this->response['outputenc'], $this->response['inputenc']);
}
}
}
}
} else {
$this->response['inputenc'] = 'UTF-8';
$this->response['inputtext'] = null;
$this->response['outputenc'] = 'UTF-7';
$this->response['outputtext'] = null;
}
return true;
}
示例3: main
protected function main()
{
if ($this->getFilter()) {
E()->getResponse()->addCookie(md5($this->getName()), convert_uuencode($this->document->componentManager->getBlockByName($this->getParam('bind'))->getFilter()));
}
$this->addToolbar($this->loadToolbar());
$this->js = $this->buildJS();
}
示例4: __construct
function __construct($raw = NULL)
{
if ($raw) {
$ephrase = JFactory::getApplication()->input->post->get('ephrase', '', 'string');
if (!$ephrase) {
return;
}
$uudat = convert_uuencode($this->doCrypt(false, $ephrase, $raw));
$this->rawtxt = $uudat;
}
}
示例5: encode
protected function encode($element)
{
if (!is_string($element)) {
$this->log("The element to uuencode is not a string - cannot proceed!", LL_ERROR);
return NULL;
}
$result = @convert_uuencode($element);
if ($result === false) {
return NULL;
}
return $result;
}
示例6: encode_decode
function encode_decode()
{
global $TMPL;
$str = $TMPL->tagdata;
$style = $TMPL->fetch_param('style');
$direction = $TMPL->fetch_param('direction');
if ($str != "") {
if ($direction == "decode") {
if ($style == "base64") {
$string = base64_decode($str);
} elseif ($style == "htmlspecialchars") {
$string = htmlspecialchars_decode($str);
} elseif ($style == "htmlentities") {
$string = html_entity_decode($str);
} elseif ($style == "uuencode") {
$string = convert_uudecode($str);
} elseif ($style == "rawurl") {
$string = rawurldecode($str);
} else {
$string = urldecode($str);
}
} else {
if ($style == "base64") {
$string = base64_encode($str);
} elseif ($style == "htmlspecialchars") {
$string = htmlspecialchars($str);
} elseif ($style == "htmlentities") {
$string = htmlentities($str, ENT_COMPAT, "UTF-8", false);
} elseif ($style == "uuencode") {
$string = convert_uuencode($str);
} elseif ($style == "rawurl") {
$string = rawurlencode($str);
} elseif ($style == "url_dash") {
$string = strtr(strtolower(urlencode($string)),'+', '-');
} else {
$string = urlencode($str);
}
}
$this->return_data = $string;
} else {
$this->return_data = "Error: You must provide content between the opening and closing tags.";
return;
}
}
示例7: packer
function packer($string, $theWay = PACKER_PACK)
{
if ($theWay == PACKER_PACK) {
//PACK
if (is_array($string)) {
//first serialize it
$string = serialize($string);
}
$result = base64_encode(convert_uuencode(strrev(base64_encode($string))));
return $result;
} else {
//UNPACK
$string = base64_decode(strrev(convert_uudecode(base64_decode($string))));
$string = unserialize($string);
return $string;
}
}
示例8: hashGenerate
function hashGenerate($string)
{
$note_hash = array('note' => array('X3-.!', '-U*1', '9#+S', '.=6A', '..(&', '^&~@', '=+_-', '69%$', '#"`7', '1-9&', 'F=*#', '36^:', '|\\|/', '%##?', '№`08', '5@*&', '0(8^', '~!?<', '>*&%', '/?>,'), 'first' => '!-_-=45AsY*', 'last' => '<-@%dHa.|');
$string = trim($string);
$string = base64_encode($string);
$string = convert_uuencode($string);
$arr = str_split($string, 2);
$note = $note_hash['note'];
$str = $note_hash['first'];
foreach ($arr as $k => $v) {
$str .= $note[$k] . $v;
}
$str .= $note_hash['first'];
$len = strlen($str);
$arr = str_split($str, $len / 2);
$key = sha1($arr[1]) . sha1($arr[0]);
return $key;
}
示例9: encode_decode
function encode_decode()
{
$this->EE =& get_instance();
$str = $this->EE->TMPL->tagdata;
$style = $this->EE->TMPL->fetch_param('style');
$direction = $this->EE->TMPL->fetch_param('direction');
if ($str != '') {
if ($direction == 'decode') {
if ($style == 'base64') {
$string = base64_decode($str);
} elseif ($style == 'htmlspecialchars') {
$string = htmlspecialchars($str);
} elseif ($style == 'htmlentities') {
$string = htmlentities($str);
} elseif ($style == 'uuencode') {
$string = convert_uuencode($str);
} elseif ($style == 'rawurlencode') {
$string = rawurldecode($str);
} else {
$string = urldecode($str);
}
} else {
if ($style == 'base64') {
$string = base64_encode($str);
} elseif ($style == 'htmlspecialchars') {
$string = htmlspecialchars_decode($str);
} elseif ($style == 'htmlentities') {
$string = html_entity_decode($str);
} elseif ($style == 'uuencode') {
$string = convert_uudecode($str);
} elseif ($style == 'rawurl') {
$string = rawurlencode($str);
} else {
$string = urlencode($str);
}
}
$this->return_data = $string;
} else {
$this->return_data = 'Error: You must provide content between the opening and closing tags.';
}
}
示例10: um_data_encode
function um_data_encode($data)
{
return base64_encode(convert_uuencode($data));
}
示例11: convert_uuencode
<?php
$some_string = "test\ntext text\r\n";
echo convert_uuencode($some_string);
?>
示例12: var_dump
<?php
var_dump(convert_uuencode(array()));
var_dump(convert_uudecode(array()));
var_dump(convert_uuencode(""));
var_dump(convert_uudecode(""));
var_dump($enc = convert_uuencode("~!@#\$%^&*()_}{POIUYTREWQQSDFGHJKL:<MNBVCXZ"));
var_dump(convert_uudecode("!@#\$%^YUGFDFGHJKLUYTFBNMLOYT"));
var_dump(convert_uudecode($enc));
var_dump($enc = convert_uuencode("not very sophisticated"));
var_dump(convert_uudecode($enc));
var_dump(convert_uudecode(substr($enc, 0, -10)));
echo "Done\n";
示例13: conf_encodeString
/**
* obscure config data so information isn't plain text
*
* @param string $str data to be encoded
* @param string $code encoding method, values: plain, base64, uuencode.
* @return string the encoded value
*/
function conf_encodeString($str, $code)
{
switch ($code) {
case 'base64':
return '<b>' . base64_encode($str);
case 'uuencode':
return '<u>' . convert_uuencode($str);
case 'plain':
default:
return $str;
}
}
示例14: var_dump
var_dump(html_entity_decode("& & &", ENT_QUOTES, "UTF-8"));
var_dump(html_entity_decode("a test &", ENT_QUOTES, "UTF-8"));
var_dump(bin2hex(html_entity_decode("È")));
var_dump(bin2hex(html_entity_decode("È", 3, "UTF-8")));
var_dump(html_entity_decode("Α"));
var_dump(bin2hex(html_entity_decode("Α", 3, "UTF-8")));
$str = "A 'quote' is <b>bold</b>";
var_dump(htmlentities($str));
var_dump(htmlentities($str, ENT_QUOTES));
var_dump(htmlentities(" ", ENT_COMPAT));
var_dump(htmlentities("Â ", ENT_COMPAT, ""));
var_dump(htmlentities("Â ", ENT_COMPAT, "UTF-8"));
var_dump(quoted_printable_encode("egfe \r\t"));
var_dump(quoted_printable_decode("=65=67=66=65="));
var_dump(convert_uudecode("+22!L;W9E(%!(4\"\$`\n`"));
var_dump(convert_uuencode("test\ntext text\r\n"));
var_dump(str_rot13("PHP 4.3.0"));
var_dump(crc32("The quick brown fox jumped over the lazy dog."));
var_dump(strlen(crypt("mypassword")));
var_dump(md5("apple"));
var_dump(sha1("apple"));
$trans = array("hello" => "hi", "hi" => "hello");
var_dump(strtr("hi all, I said hello", $trans));
var_dump(convert_cyr_string("abc", "a", "d"));
// sanity
var_dump(hebrev("test"));
// sanity
var_dump(hebrevc("test"));
// sanity
var_dump(nl_langinfo(AM_STR));
var_dump(sprintf("A%sB%dC", "test", 10));
示例15: admin_edit_blog
function admin_edit_blog($id = NULL)
{
$this->layout = "admin";
$this->loadModel("Blog");
$id = convert_uudecode(base64_decode($id));
$blogInfo = $this->Blog->find('first', array('conditions' => array('Blog.id' => $id)));
$this->set(compact('blogInfo'));
if (!empty($this->data)) {
$errors = array();
$errors = $this->validate_add_blog_ajax($this->data);
if (count($errors) == 0) {
$data = $this->data;
$this->Blog->save($data);
$mem_id = base64_encode(convert_uuencode($data['Blog']['m_id']));
$this->Session->write('success', 'Post has been edited successfully');
$this->redirect(array('action' => 'admin_blogs/' . $mem_id));
} else {
$this->set('error', $errors);
}
}
}