I have a laravel website on shared hosting and some videos on a cloud storage.
What do I need to hide direct links and stream videos on my website?
The videos are for sell and somebody might download them without paying. so every time that a user wants to see a video, I generate a random link and use it in video src. I generate random string and pass it to a function. The function finds video link and uses curl to get and play video (PHP stream remote video file) but it's not good enough. If it is possible to stream videos from another source, what do I need to do it right?
Do I need a streaming server? is apache good enough? what should I learn?
I have a website for playing MP4 and M3U files, and i have JWplayer for play this content on this website,
I want that only JWplayer be able to have access to file, and be able to play it, and I want to deny other access to this contents, I mean I want disable users access and i want they was not be able to download from my page, how should i do it ?
You can try putting token signing in place which will make it harder to have your content stolen (but not impossible): https://support.jwplayer.com/customer/portal/articles/1433647-url-token-signing
Otherwise, you may want to try using a more secure streaming method like HLS or DASH.
RTMP
OR
hls
The only solution that i know.
Basicly when client play your video, it downloaded as browser cache.
I've a download youtube scrip, after many changes I get to a point where I get a direct link to video, something like this :
http://r12---sn-4g57km7s.googlevideo.com/videoplayback?dur=265.868&pl=21&sver=3&mt=1444909527&ms=pm&source=youtube&sparams=dur,id,ip,ipbits,itag,lmt,mime,mm,mn,ms,mv,nh,pl,ratebypass,source,upn,expire&mv=s&itag=22&signature=A1D19A4DB1134E4ADF3CCBE8DDD7F5B01AB995B4.C0790F1AB331B4C290E83C292F064F67B811C17E&mm=35&mn=sn-4g57km7s&upn=qNbx8hdMDaU&nh=EAY&id=o-AAR67WMXg6mE9K6QpXf981YZf0B51_Jz_kEGYVHT9hdz&mime=video/mp4&expire=1444936669&ipbits=0&fexp=9408710,9414764,9414929,9416126,9417259,9417707,9418162,9418203,9418400,9418802,9418907,9418997,9421584,9421945,9422338,9422428,9422587,9422900&ratebypass=yes&ip=144.76.168.167&lmt=1444877662206720&key=yt6&signature=
when I enter the url in browser , it opens the video a plays it .
I tried this code but I get a file with the size of 0 as the result :
$download_video_file = file_put_contents("file", fopen($url, 'x'));
How can I download and save video from youtube and save it in my webhost ?
thanks
Download Videos from youtube is a complex issue...
Basically, youtube will generate a key when you access the video page, that key is only valid for the ip of the device accessing the page.
Check the url you've posted for a variable called ip , it has the value 144.76.168.167, this means that you'll only be able to download the video from that ip.
As I said, it's complex and you may want to take a look at https://rg3.github.io/youtube-dl/ . It's opensource video downloader that supports 700+ sites including youtube and it's updated frequently by a huge community.
youtube-dl
youtube-dl is a small command-line program to download videos from
YouTube.com and a few more sites. It requires the Python interpreter
(2.6, 2.7, or 3.2+), and it is not platform specific. We also provide
a Windows executable that includes Python. youtube-dl should work in
your Unix box, in Windows or in Mac OS X. It is released to the public
domain, which means you can modify it, redistribute it or use it
however you like.
I'm trying to build a basic web application using the Dropbox API. I have the file upload/folder listing etc. working but cannot find in the documentation how to force the file to download to the user's browser. Is this possible?
If it is can someone point me in the right direction? I'm using the standard PHP SDK.
Dropbox.com: How do I force a file to download from the web
Force a file or folder to download
To cause the browser to download a file or folder rather than display
it, you can use dl=1 as a query parameter in your URL. For example:
https://www.dropbox.com/s/qmocfrco2t0d28o/Fluffbeast.docx?dl=1 Note
that the original share link URL may contain query string parameters
already (e.g. dl=0), so app developers should make sure to properly
parse the URL and add or modify parameters as needed.
And if that doesn't suffice you can check Wikihow: How to Force a File to Download from the Web on Dropbox, with nice screenshots.
If this is not what you had in mind you have clarified that in your question. You still can do that now.
I am placing href links to remote files for download simple as this with ajax:
Link
but it opens in new window and cuts off http:// and returns not found error, although if i refresh the page it will start downloading the file.
Maybe i could specify the content type and pass with header somehow but i dont want to pass the file through my server, it should download it from remote link.
Hope i could explain well.
Thank you.
sounds like the remote site has some protection against hot linking.
Are you certain that the link is correct? Try testing it externally first using an online flash player such as http://www.flvplayeronline.com/ . If the video plays then as #EvilSpaceHamster stated it could be a permissions issue on the server. I noticed you stated download? Is this a requirement or do you just want to grant the user access to view the file?