Stream and download video but block direct access? - .htaccess

I found in a streaming site the thing I want to do and I already lost 2 days to understand how they do it. So please analyze the next info and tell me how he does this thing???
Example of what I mean is in this link: http://www.animeforce.org/ds.php?file=AbsoluteDuo/AbsoluteDuo_Ep_01_SUB_ITA.mp4
In development kit we found the direct link of this video: http://www.lacumpa.org/DDL/ANIME/AbsoluteDuo/AbsoluteDuo_Ep_01_SUB_ITA.mp4
<div style="width: 100%; position: relative;" class="html5video lightsoff" id="wtf">
<div class="main-container" id="wtf">
<div class="hero-unit">
<video controls="" preload="metadata" id="video-player">
<source type="video/mp4" src="http://www.lacumpa.org/DDL/ANIME/AbsoluteDuo/AbsoluteDuo_Ep_01_SUB_ITA.mp4"></source>
</video>
</div>
</div>
<div style="text-align: center; padding: 10px 0px 0px 0px; font-size:12pt; font-weight: bold;" class="lightsoffbtn">Modalità Cinema!</div></div>
The second was if you use Download button in the page you access to adfly "they use it to monetize" after skip the adds download start like from a hotlink but if you copy the link from where you download is the same from embedded sourcecode and if you try after stop download to use again direct link, again you are redirected to "Anty Hotlink".

Simplest solution would be a HTTP_REFERER block. If the request for the content does not include the URL of the correct referring page, in it's HTTP HEADER, you block access eg. Using mod_rewrite
RewriteCond %{HTTP_REFERER} !www.somsite.com/some_URI_path
RewriteRule \.(jpg|gif|png)$ - [F,L]
Beyond that you can do things with cookies, e.g again with mod_rewrite
RewriteCond %{HTTP_COOKIE} xxxxxxxxxxxx [NC]
RewriteRule \.(jpg|gif|png)$ - [F,L]
Or if you want to get serious use session based blocks.

Related

Opencart twig files doesnt change

I'm using opencart 3.0.2 and when i change twig files it doesn't appear on site for example there is a code like this:
<div class="compare">
<button type="button" title="{{ button_compare }}" onclick="compare.add('{{ product.product_id }}');"<span>{{ button_compare }}</span></button>
</div>
and I delete this code from file but it doesn't make any change on the site.

Opencart Kingstore lite href variable undefined

I am using OpenCart 2.2.0 with Kingstore Lite theme
At the order history when i try to view the details of one order i do get the error message:
Notice
:Undefined index: href in catalog/view/theme/kingstorepro/template/account/order_list.tpl on line
29
This is the line:
<td class="text-right"><a href="<?php echo $order['href']; ?>"
and the route is : index.php?route=account/order
How can i fix ? is at the controller or at the model ? how can i find and fix?
Try below code instead of above -
<td class="text-right"><a href="<?php echo $order['view']; ?>"
Hope this will help you.

MP3 & MP4 audio and video not working firefox

Have tried the HTACCESS fixes all the clear this rest start that fixes and still nothing, scripts work in IE, Opera, Chrome but not Firefox....HELP!!!!
<video show controls class="embed-responsive-item">
<source src="uploads\video\<?php echo $rows['File_Attached']; ?>"
type="video/mp4">
</video>
<audio preload="auto" controls>
<source src="uploads\audio\<?php echo $rows['File_Attached']; ?>" >
</audio>
Found the problem to be the path to the file, all other browsers understand upload/video/file.mp4 for example but firefox wanted upload\video\file.mp4
which all other browsers understand as well... note to self remember the correct path.

FluidTYPO3 vhs ViewHelper for SVG Images?

I use TYPO3 CMS 6.2.14, vhs 2.3.3, Flux 7.2.1 and FluidContent 4.3.1 - my TYPO3 Editor need the opportunity to upload SVG-Images via vhs-ViewHelper. I've made a new FluidTYPO3 Content Element (FCE), but there's no SVG Image visible in frontend. Mmhh?
Flux-FlexForm
<flux:field.file name="imgIcon" allowed="jpg,gif,png,jpeg,svg" uploadFolder="uploads/tx_myext" minItems="0" maxItems="1" size="1" />
...
<v:media.image src="uploads/tx_myext/{imgIcon}" alt="Icon" />
Output
<div class="small-2 columns">
<img alt="Icon" src="" width="" height="">
</div>
Also I use the htaccess entry, but there is no success. Where's my fault? Do I need heightand widthfor this ViewHelper? Aren't vectors availible in vhs?
<IfModule mod_mime.c>
...
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
...
</Ifmodule>
EDIT: I also tried the Fluid ViewHelper, but the SVG Image has height/width = 0:
<f:image src="uploads/tx_myext/{imgIcon}" width="50" height="50" class="xy" alt="Icon" />
EDIT 2: The ImagePath is correct. At Developer Tools I "see" the Image ..
EDIT 3: Oh, I see at my Filemanager (FAL) 0x0 pixels ..
Thanks merec.
Use SVG Images / TYPO3 6.2 with FluidTYPO3
Answer: Use
<img src="{f:uri.image(src: 'uploads/tx_myext/{imgIcon}')}">
instead of
<v:media.image src="uploads/tx_myext/{imgIcon}" alt="Icon" />
// OR
<f:image src="uploads/tx_myext/{imgIcon}" width="50" height="50" class="xy" alt="Icon" />

Bootstrap 3.3.0 and Visual Studio 2012

like here I tried to update "Microsoft ASP.NET Web Optimization Framework" but It doesn't solve my problem: I get a index out of range in
#Styles.Render("~/Content/css")
for bootstrap.css. If I delete the following rules:
_:-ms-fullscreen,
:root input[type="date"],
_:-ms-fullscreen,
:root input[type="time"],
_:-ms-fullscreen,
:root input[type="datetime-local"],
_:-ms-fullscreen,
:root input[type="month"] {
line-height: 1.42857143;
}
_:-ms-fullscreen.input-sm,
:root input[type="date"].input-sm,
_:-ms-fullscreen.input-sm,
:root input[type="time"].input-sm,
_:-ms-fullscreen.input-sm,
:root input[type="datetime-local"].input-sm,
_:-ms-fullscreen.input-sm,
:root input[type="month"].input-sm {
line-height: 1.5;
}
_:-ms-fullscreen.input-lg,
:root input[type="date"].input-lg,
_:-ms-fullscreen.input-lg,
:root input[type="time"].input-lg,
_:-ms-fullscreen.input-lg,
:root input[type="datetime-local"].input-lg,
_:-ms-fullscreen.input-lg,
:root input[type="month"].input-lg {
line-height: 1.33;
}
it works. It's a "Microsoft ASP.NET Web Optimization Framework" bug or what?
You need to update to WebGrease 1.6.
Same issue with VS2013 and removing the code section as stated by Ymir works. I am not sure what are the issues will come up because of removing this code though. I would wait till Bootstrap fixes this issue.
Yes there is CSS breaks !!!
Augustine Cost reported this issue on Microsoft site as well
https://connect.microsoft.com/VisualStudio/feedback/details/1015447/css-parser-breaks-on-ie-hacks-in-bootstrap-3-3-0
But still there is no ideal resolution besides removing this section.
Update the WebGrease to version 1.6

Resources