embed-play megaporn/youtube/etc videos with your own ads - HACK tutorial

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SmokeyTheBear
    ►SouthOfHeaven
    • Jun 2004
    • 28609

    #1

    embed-play megaporn/youtube/etc videos with your own ads - HACK tutorial

    Embed or play flash movies from pretty much every site using your own ads in windows media player. All their ads will be disabled.

    Windows media player has the ability to play many different files you usually associate with other programs, such as jpg's gif's png's wav's swf and many many others, it can even play websites.

    The downside of playing flash in windows media player is any page loading is disabled ( i.e. ads ) controls in flash will still work properly ( play stop pause etc )

    The best way to display multiple types of files at once is to create a playlist, this also allows you to place a clickable banner below your videos. Using php we can create a simple dynamic playlist from a template.

    save the following file as player.php

    SIMPLE VERSION WITH BANNER
    Code:
    <?php
    $x = $_GET['x'];
    header('Content-type: video/x-ms-wvx');
    ?>
    <ASX VERSION="3.0">
    <ENTRY>
    <Banner href="http://bannerurl.com/banner2.gif">
    <MoreInfo href = "http://www.linkurl2.com" />
    <Abstract>Click Here To Visit</Abstract>
    </Banner>
    		 	<REF HREF="<?php echo $x; ?>" />
    		</ENTRY>
    	
    </ASX>

    now to play any video in your new playlist in media player simply link to

    yoursite.com/player.php?x=LINK

    where link is the link in the SRC of the embed code from the video you are linking to.

    for example the following is a sample embed code from youtube

    Code:
    <object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/Hsj2MHgG48s&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Hsj2MHgG48s&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>
    look for where it says embed src= in any embed code ( stop at any blank space " or & )

    so for that video the src link would be http://www.youtube.com/v/Hsj2MHgG48s

    so to play that video in your player you would link to

    yoursite.com/player.php?x=http://www.youtube.com/v/Hsj2MHgG48s


    here is an example embed code from megaporn
    Code:
    <object width="640" height="480"><param name="movie" value="http://www.megaporn.com/e/F81T0S3D77307cc99c8acfaee53bead0d61a92f0"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.megaporn.com/e/F81T0S3D77307cc99c8acfaee53bead0d61a92f0" type="application/x-shockwave-flash" allowfullscreen="true" width="640" height="480"></embed></object>
    so the src link is http://www.megaporn.com/e/F81T0S3D77307cc99c8acfaee53bead0d61a92f0

    so you would link to

    yoursite.com/player.php?x=http://www.megaporn.com/e/F81T0S3D77307cc99c8acfaee53bead0d61a92f0



    when you link to a video it will open windows media player automatically
    or you can embed your dynamic video using the following code.

    example code ( pay close attention to how link is set just as above )
    [code]
    <object width="640" height="480"><param name="movie" value="http://yoursite.com/player.php?x=http://www.megaporn.com/e/F81T0S3D77307cc99c8acfaee53bead0d61a92f0"></param><param name="allowFullScreen" value="true"></param><embed src="http://yoursite.com/player.php?x=http://www.megaporn.com/e/F81T0S3D77307cc99c8acfaee53bead0d61a92f0" type="video/x-ms-wvx" allowfullscreen="true" width="640" height="480"></embed></object>
    [code]



    heres 2 links to the script in action


    ( requires windows media player )

    YOUTUBE EXAMPLE

    MEGAPORN EXAMPLE
    hatisblack at yahoo.com
  • Brujah
    Beer Money Baron
    • Jan 2001
    • 22157

    #2
    I'd love to see it in action but I'm on a Mac

    Comment

    • munki
      Do Fun Shit.
      • Dec 2004
      • 13393

      #3
      I love your hacks...

      I have the simplest tastes. I am always satisfied with the best.” -Oscar Wilde

      Comment

      • spacedog
        Yes that IS me. Bitch.
        • Nov 2001
        • 14149

        #4
        the megarotic one still has their dating ad on it with the clickable link, but wow.. what a fucking awesome hack.. great job as usual.

        Comment

        • SmokeyTheBear
          ►SouthOfHeaven
          • Jun 2004
          • 28609

          #5
          you can also play a picture in your player , complete with banner in windows media player

          example
          http://ytmnd.webspacemania.com/megap...eams/Emily.jpg
          hatisblack at yahoo.com

          Comment

          • SmokeyTheBear
            ►SouthOfHeaven
            • Jun 2004
            • 28609

            #6
            Originally posted by spacedog
            the megarotic one still has their dating ad on it with the clickable link, but wow.. what a fucking awesome hack.. great job as usual.
            cept aff gets no love the link wont work heh
            hatisblack at yahoo.com

            Comment

            • SmokeyTheBear
              ►SouthOfHeaven
              • Jun 2004
              • 28609

              #7
              you can also link to live cam feeds

              http://ytmnd.webspacemania.com/megap...omoplay010.swf
              hatisblack at yahoo.com

              Comment

              • IllTestYourGirls
                Ah My Balls
                • Feb 2007
                • 14311

                #8
                dude looks awesome bookmarked this thanks

                Comment

                • SmokeyTheBear
                  ►SouthOfHeaven
                  • Jun 2004
                  • 28609

                  #9
                  now i am not suggesting blatantlly ripping people off but you can use this tool for you and them

                  the last link i posted was for a live cam feed to needlive ( see sig )

                  you can use this to drive traffic to the sponsor by allowing a surfer to "save" the video , like if you save the link above to your dekstop it saves as a video , surfer can save to his desktop and see a live cam model everyday without even opening his/her browser, if they want to buy minutes they click your banner

                  try "save as" the following link
                  http://ytmnd.webspacemania.com/megap...omoplay010.swf

                  Megaporn has full length videos from sponsors who dont seem to mind , yet these sponsors dont give me the same full length videos to promote them with , so you can link to a megaporn video from nastydollars and link back to the real sponsor with your banner
                  Last edited by SmokeyTheBear; 01-23-2009, 04:00 PM.
                  hatisblack at yahoo.com

                  Comment

                  • fris
                    Too lazy to set a custom title
                    • Aug 2002
                    • 55679

                    #10
                    while you are on the subject of megaporn, heres some code to actually download a video from the site

                    PHP Code:
                    <?php
                    
                    function megaporn_decrypt($str_hex, $key1, $key2){
                    
                      $str_bin = "";
                    
                      // 1. Convert hexadecimal string to binary string
                    
                      for($i = 0; $i < 128; $i++){
                        $str_bin .= floor(hexdec($str_hex[floor($i/4)])/pow(2,(3-($i%4))))%2;
                      }
                    
                      // 2. Generate switch and XOR keys
                    
                      $key = Array();
                      for ($i = 0; $i < 384; $i++){
                        $key1 = ($key1 * 11 + 77213) % 81371;
                        $key2 = ($key2 * 17 + 92717) % 192811;
                        $key[$i] = ($key1 + $key2) % 128;
                      }
                    
                      // 3. Switch bits positions
                    
                      for ($i = 256; $i >= 0; $i--){
                        $temp = $str_bin[$key[$i]];
                        $str_bin[$key[$i]] = $str_bin[$i%128];
                        $str_bin[$i%128] = $temp;
                      }
                    
                      // 4. XOR entire binary string
                    
                      for ($i = 0; $i < 128; $i++){
                        $str_bin[$i] = $str_bin[$i] ^ $key[$i+256] & 1;
                      }
                    
                      // 5. Convert binary string back to hexadecimal
                    
                      $str_hex = "";
                      for($i = 0; $i < 32; $i++){
                        $str_hex .= dechex(bindec(substr($str_bin, $i*4, 4)));
                      }
                    
                      // 6. Return counted string
                    
                      return $str_hex;
                    }
                    
                    // Is set the "v" variable?
                    
                    if (!isset($_GET['v']) or ($_GET['v']=="")) {die("no id set");}
                     
                    else {
                    
                       $megaurl = "http://www.megaporn.com/video/?v=".$_GET['v'];
                    
                      //Obtain Megaporn ID from link
                    
                       $id = explode("v=",$megaurl);
                    
                      // Does player send video position?
                    
                      $pos = (isset($_GET["pos"]) ? intval($_GET["pos"]) : "");
                    
                      // Obtain Megaporn XML playlist file
                    
                      if ($content = file_get_contents("http://www.megaporn.com/video/xml/videolink.php?v=".$id[1])){
                    
                        // Parameters which I want to obtain from XML;
                    
                        $parameters = Array("un", "k1", "k2", "s", "size");
                    
                        $success = true;
                    
                        // Obtain parameters from XML one by one
                    
                        for($i=0; $i<count($parameters); $i++){
                          $success = $success && preg_match('/ ' . $parameters[$i] . '="([^"]+)"/', $content, $match);
                          $$parameters[$i] = $match[1];
                        }
                        if($success){
                    
                          // count "dkey" from obtained parameters
                    
                          $dkey=megaporn_decrypt($un,$k1,$k2);
                    
                          // set URL address of video file
                    
                          $video_url = "http://www".$s.".megaporn.com/video/files/".$dkey."/".$pos;
                    
                          // Send headers to browser
                    
                          header("Content-Type: video/flv");
                          header("Content-Disposition: attachment; filename=$id[1].flv;" );
                          header("Content-Length: ".$size);
                    
                          // Read video file from Megaporn server
                    
                          readfile($video_url);
                    
                        }
                      }
                    }
                    
                    ?>
                    Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                    Comment

                    • SmokeyTheBear
                      ►SouthOfHeaven
                      • Jun 2004
                      • 28609

                      #11
                      p.s. you can "save as " any of the links, even the youtube ones , it saves as a video on your computer , so you dont have to load youtube and your favourites each time , simply save the video , it takes up no space because its simply a shortcut in video form
                      hatisblack at yahoo.com

                      Comment

                      • SmokeyTheBear
                        ►SouthOfHeaven
                        • Jun 2004
                        • 28609

                        #12
                        Originally posted by fris
                        while you are on the subject of megaporn, heres some code to actually download a video from the site
                        hatisblack at yahoo.com

                        Comment

                        • jollyperv
                          Confirmed User
                          • Nov 2001
                          • 3927

                          #13
                          Cool shit, bookmarking this thread

                          Comment

                          • IllTestYourGirls
                            Ah My Balls
                            • Feb 2007
                            • 14311

                            #14
                            just tried it on one of my sites. worked like a charm. thanks a lot!

                            Comment

                            • retardednewbie
                              Confirmed User
                              • Jul 2002
                              • 191

                              #15
                              nice hack buddy..

                              Comment

                              Working...