git.p6c8.net
/
jirafeau_project.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move documentation to README.md
[jirafeau_project.git]
/
lib
/
functions.php
diff --git
a/lib/functions.php
b/lib/functions.php
index 77acae1bd973f281586111e295bf096eef3234bd..18002314ca841697eb58a6e8c230eee5744d9726 100644
(file)
--- a/
lib/functions.php
+++ b/
lib/functions.php
@@
-1134,3
+1134,14
@@
function get_ip_address($cfg) {
}
return $_SERVER['REMOTE_ADDR'];
}
}
return $_SERVER['REMOTE_ADDR'];
}
+
+/**
+ * Convert hexadecimal string to base64
+ */
+function hex_to_base64($hex)
+{
+ $b = '';
+ foreach (str_split ($hex, 2) as $pair)
+ $b .= chr (hexdec ($pair));
+ return base64_encode ($b);
+}
patrick-canterino.de