View Single Post
  #509  
Old 05-04-2009, 10:03 AM
SkyCatcher's Avatar
SkyCatcher SkyCatcher is offline
 
Join Date: Feb 2003
Location: Germany
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

Thanks for the fantastic work on this mod, I love it.

That being said, there is a host I we use on our forums which has incredible quality and I've been trying to get it to work but I'm stumped because it uses a weird mechanic and I was hoping that maybe I was overlooking something.


The site is http://www.noobflicks.com

The video URLs are as such: http://www.noobflicks.com/watch/6006...s_vs_xt-002_25

My pregmatch definition is:
http://www\.noobflicks\.com/watch/[0-9]+/([\w_-])+

The problem is that the actual embed code (just for this video linked) is:

Code:
<object width="480" height="410"><param name="movie" value="http://v.giantrealm.com/embed/publisher_id=23&file_id=aHR0cDovL3ZjZG4uZ2lhbnRyZWFsbS5jb20vZ2lhbnRyZWFsbS9ub29iZmxpY2tzL3ZCekRFTkR1TkZ3dGhmVnV4dDAwMjI1d212cXRnOWQzLndtdi14MjY0Lm1wNA==&from=aHR0cDovL3d3dy5ub29iZmxpY2tzLmNvbS93YXRjaC82MDA2L3NwaXJpdF93YWxrZXJzX3ZzX3h0LTAwMl8yNQ==&thumbnail=aHR0cDovL3d3dy5ub29iZmxpY2tzLmNvbS90aHVtYnMveHQwMDIyNXdtdnF0ZzlkMy53bXYtanBnLmpwZw==" type="application/x-shockwave-flash"></param><param name="allowfullscreen" value="true"></param><param name="wmode" value="transparent"></param><embed src="http://v.giantrealm.com/embed/publisher_id=23&file_id=aHR0cDovL3ZjZG4uZ2lhbnRyZWFsbS5jb20vZ2lhbnRyZWFsbS9ub29iZmxpY2tzL3ZCekRFTkR1TkZ3dGhmVnV4dDAwMjI1d212cXRnOWQzLndtdi14MjY0Lm1wNA==&from=aHR0cDovL3d3dy5ub29iZmxpY2tzLmNvbS93YXRjaC82MDA2L3NwaXJpdF93YWxrZXJzX3ZzX3h0LTAwMl8yNQ==&thumbnail=aHR0cDovL3d3dy5ub29iZmxpY2tzLmNvbS90aHVtYnMveHQwMDIyNXdtdnF0ZzlkMy53bXYtanBnLmpwZw==" type="application/x-shockwave-flash" width="480" height="410" allowfullscreen="true" wmode="transparent"></embed></object>
Notice the randomly generated string for file_id, thumbnail and uploader.


The source for the pages script is:

Code:
<div align="center" id="vspMainContainer">
	                  <script type="text/javascript">          
	                        var publisher_id = '23';
	                        document.write('<scr'+'ipt type="text/javascript" src="http://v.giantrealm.com/get.php?pid=' + publisher_id + '&ord=' + ord + '&so=' + typeof swfobject + '"></scr'+'ipt>');                                  
	                  </script>
	                  <script type="text/javascript">          
	                        gr.vau.videoURL = 'http://vcdn.giantrealm.com/giantrealm/noobflicks/vBzDENDuNFwthfVuxt00225wmvqtg9d3.wmv-x264.mp4';
	                        gr.vau.thumbnailURL = 'http://www.noobflicks.com/thumbs/xt00225wmvqtg9d3.wmv-jpg.jpg';
	                        gr.vau.view.renderPlayer();        
	                  </script>
	                  <div id="vauBanner" style="display:none;">
	                        <script language="javascript">
	                        gr.vau.view.getAd(gr.vau.companion);
	                        </script>

	                  </div>
	                  <div id="vauBreakout" style="display:none;">
	                        <script language="javascript">
	                        gr.vau.view.getAd(gr.vau.breakout);
	                        </script>
	                  </div>
Also there seems to be a URL encode script at the top of the page:

Code:
<script type="text/javascript">
	function nOpenBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
	  if(window.screen)if(isCenter)if(isCenter=="true"){
	    var myLeft = (screen.width-myWidth)/2;
	    var myTop = (screen.height-myHeight)/2;
	    features+=(features!='')?',':'';
	    features+=',left='+myLeft+',top='+myTop;
	  }
	  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
	}
	function URLEncode(st)
	{
		// The Javascript escape and unescape functions do not correspond
		// with what browsers actually do...
		var SAFECHARS = "0123456789" +					// Numeric
						"ABCDEFGHIJKLMNOPQRSTUVWXYZ" +	// Alphabetic
						"abcdefghijklmnopqrstuvwxyz" +
						"-_.!~*'()";					// RFC2396 Mark characters
		var HEX = "0123456789ABCDEF";
	
		var plaintext = st;
		var encoded = "";
		for (var i = 0; i < plaintext.length; i++ ) {
			var ch = plaintext.charAt(i);
		    if (ch == " ") {
			    encoded += "+";				// x-www-urlencoded, rather than %20
			} else if (SAFECHARS.indexOf(ch) != -1) {
			    encoded += ch;
			} else {
			    var charCode = ch.charCodeAt(0);
				if (charCode > 255) {
				    alert( "Unicode Character '" 
	                        + ch 
	                        + "' cannot be encoded using standard URL encoding.\n" +
					          "(URL encoding only supports 8-bit characters.)\n" +
							  "A space (+) will be substituted." );
					encoded += "+";
				} else {
					encoded += "%";
					encoded += HEX.charAt((charCode >> 4) & 0xF);
					encoded += HEX.charAt(charCode & 0xF);
				}
			}
		} // for
	
		//document.URLForm.F2.value = encoded;
	  	//document.URLForm.F2.select();
		return encoded;
	};
	</script>
	
	
	<script language="Javascript">
	<!--
	var axel = Math.random() + "";
	var ord = axel * 1000000000000000000;
	//-->
	</script>


So I'm stumped. Any way to do this since it seems to take the URL and encode it?
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01265 seconds
  • Memory Usage 1,794KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete