1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Require] PHP File Embedable, but not directly viewed.

Discussion in 'Hire a Freelancer' started by Studyhard123, Jun 28, 2013.

  1. Studyhard123

    Studyhard123 Junior Member

    Joined:
    Jun 16, 2013
    Messages:
    115
    Likes Received:
    14
    Hey guys, I'm looking for someone who could edit the embed.php for my video site.
    I want my videos to be embeddable on certain websites, but not directly viewed.

    I.e I can embed them on a forum, but if someone tries to open /embed.php?/video.mp4, it will redirect.

    Thanks.
     
  2. HerpDerpSlerp

    HerpDerpSlerp Power Member

    Joined:
    Mar 19, 2013
    Messages:
    778
    Likes Received:
    623
    do you want it white listed or black listed?

    edit: if you are just trying to lock direct access to your videos that can be accomplished with .htaccess
     
  3. Studyhard123

    Studyhard123 Junior Member

    Joined:
    Jun 16, 2013
    Messages:
    115
    Likes Received:
    14
    I'm trying to whitelist a certain website, and block the rest.
    When I add .htaccess, it blocks the embedded video from loading :S
     
  4. HerpDerpSlerp

    HerpDerpSlerp Power Member

    Joined:
    Mar 19, 2013
    Messages:
    778
    Likes Received:
    623
    create a variable array of the list of the sites you allow to embed and an if statement around your player, else a link back to your site instead of the player. you might need to put that on another page if embed.php is strictly your player.

    as far as .htaccess add this line it should work:

    Code:
    RedirectMatch permanent ^/$ http://www.yourdomainhere.com/embed.php$1
     
  5. Studyhard123

    Studyhard123 Junior Member

    Joined:
    Jun 16, 2013
    Messages:
    115
    Likes Received:
    14
    I have no idea how to do that :S, tried googling but I have no idea.
     
  6. johnpup

    johnpup Regular Member

    Joined:
    Jan 31, 2013
    Messages:
    247
    Likes Received:
    29
    i can do this, add me on skype: walcott911
    thanks.