ionCube Logo
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


 
Post new topic   Reply to topic    ionCube Forum Index -> Suggestions and Feedback

free html encoding: ERROR: UTF8

Author Message
bhaktnet



Joined: 01 May 2008
Posts: 5

PostPosted: Thu May 01, 2008 11:02 am    Post subject: free html encoding: ERROR: UTF8 Reply with quote

I have php files that generate UTF8 compliant data inside html pages.
However, I find that the encoder does not correctly encode/decode this UNICODE data.
The rest of the html file is encoded/decoded properly.

Help!
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2757

PostPosted: Thu May 01, 2008 2:06 pm    Post subject: Reply with quote

A limitation of the current version is that it assumes 7 bit ASCII. The program is provided free on an as-is basis, and may be updated in the future.
_________________
Community Admin
Back to top
View user's profile Send private message
bhaktnet



Joined: 01 May 2008
Posts: 5

PostPosted: Thu May 01, 2008 4:27 pm    Post subject: Paid option? Reply with quote

Is there a paid version that does the html encoding in UTF8 correctly?
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2757

PostPosted: Thu May 01, 2008 4:57 pm    Post subject: Reply with quote

Not currently. It's an interesting script, but we chose not to sell it as there are distinct downsides and shortcomings to the technique in general.

While hiding HTML, preventing right click etc. is possible, and the 7 bit ascii issue aside our script is possibly the best way to do it, it's not necessarily a good idea. It prevents search engines spidering content, can disrupt the user experience, and the potential benefits of using data compression between the server and client are also near enough eliminated, giving rise to larger web pages and possibly slower page load times.

Restricting access to the content through event handlers and wrapping content in Javascript can also be worked around in a number of ways, such as simply taking a screen shot and cropping to leach images, scanning the browser cache, patching an open source browser, using a plugin that operates on the DOM such as firebug, and so on. To make a site still search engine friendly one could detect the user agent, but that then becomes a loophole unless you also match IP addresses, which again is a risk to search engines unless you get the IP addresses correct. Despite this there may still be benefits to the technique, but considerations such as the above should be kept in mind.
_________________
Community Admin
Back to top
View user's profile Send private message
bhaktnet



Joined: 01 May 2008
Posts: 5

PostPosted: Thu May 01, 2008 6:49 pm    Post subject: On/Off Switch Reply with quote

I have noticed that the encoding commences from where the html_encoder_1.9.php has been included into the original php.
i.e. any html code written/generated prior to this point of inclusion is not encoded!

Therefore, my next questionis:
Do we have START and PAUSE/END/STOP tags which can indicate to the encoder the portion that needs to be encoded.

e.g:
<html>
.
anyway does not encode this section
.
<?php include("html_encoder_1.9.php")?>
....starts to encode
.
IS THERE A TAG TO MAKE IT PAUSE/STOP IT HERE!!
.
code not to be encoded
.
</html>
Back to top
View user's profile Send private message
bhaktnet



Joined: 01 May 2008
Posts: 5

PostPosted: Thu May 01, 2008 6:58 pm    Post subject: Appreciation Reply with quote

I do appreciate you point of view. The prevention of right-click/selection etc can be done in a number of ways (see my website: http://www.bhakt.net/ where i use the right-click as a 'helper' rather than a restricter!!

I also agree with you regarding the increase in file-size, which is contrary to the use of compression scripts like gzip.

However, to retain the advantage, why doesn't your encoding just 'squeeze' the content - like some shrinkers. Just reduces the size, makes the code low-level-unreadable, gives advantage to compression, without restricting mouse events.

Why I am pestering you about this is, because just a primary-level confusion in scripting is desirable (see www.google.com). No additional javascript is to be introduced.

YOUR SCRIPT HAS THE ADVANTAGE OF SITTING IN BETWEEN THE APACHE WEB-SERVER AND THE ACTUAL DELIVERY!
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2757

PostPosted: Fri May 02, 2008 1:31 pm    Post subject: Re: Appreciation Reply with quote

bhaktnet wrote:
However, to retain the advantage, why doesn't your encoding just 'squeeze' the content - like some shrinkers. Just reduces the size, makes the code low-level-unreadable, gives advantage to compression, without restricting mouse events.


Just as the ipod doesn't play cassette tapes or minidisks in order to retain the "advantage" of compatibility with legacy formats, the script doesn't just remove whitespace simply because that's not what it's designed to do.

Quote:
just a primary-level confusion in scripting is desirable (see www.google.com). No additional javascript is to be introduced.


Removing space does reduce page size but this is not really obfuscation, and mere obfuscation alone as a protection mechanism is pretty much pointless and ineffective as the code can be reformatted easily and automatically using tools. Google are most likely removing whitespace just to reduce page load size, particularly if they do not serve compressed pages. I would expect that there are scripts to remove whitespace from HTML if that's what you are looking to do, but using page compression will provide even smaller pages due to compression of the tags.
_________________
Community Admin
Back to top
View user's profile Send private message
bhaktnet



Joined: 01 May 2008
Posts: 5

PostPosted: Fri May 02, 2008 2:49 pm    Post subject: Reply with quote

That is the point. There are other sripts to shrik the html pages etc.

BUT NONE OF THEM SIT ON THE SERVER SIDE PROCESSING PHP OUTPUT BEFORE DELIVERY !!

That is the reason for my pursual. Your script sits on the server side, like gzip, processing the output file from php scripts!
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2757

PostPosted: Fri May 02, 2008 3:51 pm    Post subject: Reply with quote

Right, and this is a neat way to do things. Munging pages as javascript is relatively easy, but removing whitespace is more complicated to do efficiently, thoroughly and 100% reliably. What would probably give the biggest single gain, and also be easy and pretty reliable, is to remove whitespace from before an open element. You can use the PHP output buffering to start capturing output and have a callback triggered at the end of the request that filters the output and replaces the whitespace using a regexp search/replace. This would be only a few lines of PHP.
_________________
Community Admin
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ionCube Forum Index -> Suggestions and Feedback All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum