Extension than to obfuscate links

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Suggested Hosts
Post Reply
User avatar
DockPro
Registered User
Posts: 5
Joined: Sun Mar 25, 2018 10:59 pm

Extension than to obfuscate links

Post by DockPro » Sat Jun 02, 2018 8:39 am

Extension than to obfuscate links.
Hi yes, I am trying to add a code that hides the links of the source code with base64, what I achieved, but nothing else on a php page, directly in a binary code you can not use html code with php.
An extension that I add a BBcode with these features would be excellent to avoid theft of links, this is a problem with people who like content paste content from other people.
I leave an example of a button.

base64.php

Code: Select all

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
   <script  type="text/javascript" src="/base64/camuflalinks.js"></script>

 <?php
function base64url_encode($data) { 
return rtrim(strtr(base64_encode($data), '+/', '-_'), '='); 
} 

function base64url_decode($data) { 
return base64_decode(str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT)); 
}
php?>



<span class="camuflaEnlace" atributo="<?=base64url_encode("{URL}");?>">
<input method="get" type ="submit" value="Link" />
</span>
Image

User avatar
martti
Registered User
Posts: 573
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: Extension than to obfuscate links

Post by martti » Mon Jul 16, 2018 12:39 pm

In order to modify the links you can use the core.append_sid event in an extension. (file: includes/functions.php)

Code: Select all

	/**
	* This event can either supplement or override the append_sid() function
	*
	* To override this function, the event must set $append_sid_overwrite to
	* the new URL value, which will be returned following the event
	*
	* @event core.append_sid
	* @var	string		url						The url the session id needs
	*											to be appended to (can have
	*											params)
	* @var	mixed		params					String or array of additional
	*											url parameters
	* @var	bool		is_amp					Is url using &amp; (true) or
	*											& (false)
	* @var	bool|string	session_id				Possibility to use a custom
	*											session id (string) instead of
	*											the global one (false)
	* @var	bool|string	append_sid_overwrite	Overwrite function (string
	*											URL) or not (false)
	* @var	bool	is_route					Is url generated by a route.
	* @since 3.1.0-a1
	*/
	$vars = array('url', 'params', 'is_amp', 'session_id', 'append_sid_overwrite', 'is_route');
	extract($phpbb_dispatcher->trigger_event('core.append_sid', compact($vars)));

Post Reply

Return to “Extension Requests”

Who is online

Users browsing this forum: nou nou and 14 guests