- This tiny script will allow you to decode your links and display them on a flash object, making it hard for scrapers to get the actual link.
- This project uses a swf flash object file that takes in parameters as flash vars.
- The flash object is completely customizable: Dimensions, colors, text, labeling, tooltips, etc.
- The project size is only 14KB zipped.
Installation & Documentation:
- Application installation:
- Extract the folder into your working directory.
- Implement example.php to your application.
- Important Questions
- 1) Is this 100% foolproof?
No it is not, as a matter of fact, to decode the link, it will take less than 5 minutes to do so, as the encode/decode functions are open and so is the key. However, it will make it hard for the normal users to do.
- 2) Can I make this any harder?
Yes, by hiding the key, which is not possible except if you have access to actionscript builders, like Flash Builder. If you are interested, you can contact me for the original project source code so you can use it and hard code the key and build your unique swf file.
Alternatively, you can make this harder by generating the keycode on the fly and sending it that way. This way if someone tries to scrape your website, they will actually have to look for the key instead of them having it hard coded.
- 1) Is this 100% foolproof?
- Encoding Links:
<?php require('linkHider.class.php'); $encoder = new Encoder(); echo $encoder->('http://azizsaleh.com', 'keyEncodeUse');
- Flash Variables:
- Now, you need to pass theLink and the KeyEncodeUse to the flash object using flash vars, You can also set other various flash vars to customize the looks. Here is a complete list:
- keyFile » location of the file containing your “keyEncodeUse” string
- key » or you can just send the “keyEncodeUse” string using the flash var » or you can use the preset “keyEncodeUse” of asd123456693 by not sending any key info
- width » Width of the flash object default » 240
- height » Height of the flash object default » 22
- label » The text label default » Click Here Now
- bgColor » Flash object background color default » #CCCCCC
- textColor » Label Text color default » #000000
- openType » Link target type default » _self, available:_self, _parent, _blank, _top
- toolTip » Label Text tooltip on mouse over, use % in place of link default » null
- Extract folder into your server.
- Open configs.ini.php and update the following:
- consumer_key » Your consumer key provided by Netflix
- shared_key » Your shared key provided by Netflix
- app_name » Your Application Name provided by Netflix
- app_callback » Location of the file token_response.php
- app_redirect » Page where the users will go to after their login at netflix (immediately after passing by app_callback)
- token_storage » Storage object (storageObject.file.php – File storage, storageObject.mysql.php – mysql storage)
- token_dir » If using file storage, location where tokens are stored
- [db_info] » Your Database information is you are using mysql storage
- View example.php to view how it works.
- Open documentation.html for complete API information.