Encode and Decode with base64 in shortcode?
-
I have this functions…
First is for encoding URL:
function urle( $atts, $content = null ) { $cnt = base64_encode($content); return '<a href="/external?link='.$cnt.'">Visit Link</a>'; } add_shortcode( 'urle', 'urle' );
Second is for decoding URL:
function urls( $atts, $content = null ) { $content = $_GET['link']; $cnt = base64_decode($content); return '<a href="'.$cnt.'">Visit Link</a>'; }
Problem is in first, if I use [urle]https://www.ads-software.com[/urle]
Link is /external?link=
It is empty. Where is the catch?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Encode and Decode with base64 in shortcode?’ is closed to new replies.