How can i encrypt like this? site included as demo

Discussion in 'PHP' started by romeo2010, Nov 5, 2009.

  1. #1
    How can i encrypt the full embed code

    like this as an example

    check it live http://www.fastpasstv.com/watch/1/2994/1
     
    romeo2010, Nov 5, 2009 IP
  2. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can't encrypt the whole embed or the browser won't be able to parse it....
     
    JAY6390, Nov 6, 2009 IP
  3. AsHinE

    AsHinE Well-Known Member

    Messages:
    240
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    138
    #3
    Actually you can encrypt embed code and put it into the page with javascript.
     
    AsHinE, Nov 6, 2009 IP
  4. Gray Fox

    Gray Fox Well-Known Member

    Messages:
    196
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    130
    #4
    VmpCYWIxUm5CRFpTWVE4NEJUNVZQZ1UxQnpkWmFBOXNWV0VHWlZsbFZtY0ZlRkEzQkdSU05nQitVV0VCTlZSaUFTZ0VNQUk0QldRRksxSTJWMklNWXc9PQ%3D%3D
    Code (markup):
    That looks like a base64_encode'd string
     
    Gray Fox, Nov 6, 2009 IP
  5. kmofo

    kmofo Active Member

    Messages:
    442
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    85
    #5
    kmofo, Nov 6, 2009 IP
  6. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #6
    That's pretty pointless though, it's easily reverse engineered, plus when you use something like firebug etc it will give away exactly what it shows
     
    JAY6390, Nov 6, 2009 IP
  7. AsHinE

    AsHinE Well-Known Member

    Messages:
    240
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    138
    #7
    JAY6390, its true. But I don't see any ways of encrypting filename that can't be reversed with firebug.
    Flash player will have access to video/audio file anyway and firebug will show it.
     
    AsHinE, Nov 6, 2009 IP
  8. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I agree. I don't see the reasoning behind romeo2010 wanting to do this either :confused:
     
    JAY6390, Nov 6, 2009 IP
  9. AsHinE

    AsHinE Well-Known Member

    Messages:
    240
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    138
    #9
    I guess there is somthing like that inside .htaccess:
    
    RewriteEngine On
    RewriteBase /
    RewriteRule ^/zshare/(.+?)$	/script.php?filehash=$1 [L]
    
    Code (markup):
    So basically you can compute some hash of filename and check it in the script and output necessary file.
     
    AsHinE, Nov 6, 2009 IP
  10. szalinski

    szalinski Peon

    Messages:
    341
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Filename encoding is also useful for filenames which contain non-standard or 'troublesome' characters such as ' or other entities.
     
    szalinski, Nov 8, 2009 IP
  11. romeo2010

    romeo2010 Peon

    Messages:
    183
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    romeo2010, Nov 8, 2009 IP
  12. romeo2010

    romeo2010 Peon

    Messages:
    183
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12


    reasoning behind is. i dont want anyone to copy the embed code from my site and post it on their sites...
     
    romeo2010, Nov 8, 2009 IP
  13. romeo2010

    romeo2010 Peon

    Messages:
    183
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13


    I just want the my embed code to be encrypted and readable by browser... and no one copy directly from view source the embed code


    i have a script that i will post the embed code....

    http://www.phpsugar.com/pm_demo/chris-isaak/dancin-video_3aa4e9f5b.html

    if you view the source this is the function that display the embed code to play the videos...
    
    <script type="text/javascript">
    	
    			var embed_code =  '<object width="496" height="401">   <param name="movie" value="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.40" />   <param name="wmode" value="window"></param>   <param name="allowFullScreen" value="true" />   <param name="AllowScriptAccess" VALUE="always" />   <param name="bgcolor" value="#000000" />   <param name="autoPlay" value="1" />   <param name="flashVars" value="id=v217241218&amp;vid=5521496&amp;lang=en-us&amp;intl=us&amp;embed=1&amp;thumbUrl=http%3A//d.yimg.com/ec/image/v1/video/217241218;size=158x111" />   <embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.40" type="application/x-shockwave-flash" width="496" height="401" allowFullScreen="true" AllowScriptAccess="always" bgcolor="#000000" flashVars="id=v217241218&amp;vid=5521496&amp;lang=en-us&amp;intl=us&amp;embed=1&amp;thumbUrl=http%3A//d.yimg.com/ec/image/v1/video/217241218;size=158x111&autoPlay=1" >   </embed>  </object>' ;
    				
    			$("#Playerholder").html(embed_code).show();
    			
    		</script>
    Code (markup):


    So How to make that function to be encrypted any how so that when someone view source they see the encrypted code..
     
    romeo2010, Nov 9, 2009 IP