I'm searching solution for this problem for a long time. about 3 weeks i didn't got any solutions.
See
This is the openload embedded url to be extracted
https://openload.co/embed/nLFGFH8VuZs/
The Direct Link :
https://1fiafzt.oloadcdn.net/dl/l/5qcL-TC0FIr7GgUX/nLFGFH8VuZs/VELMA2017RIPN15.mkv.mp4
Can anybody can suggest to solution to extract it. I got the direct url using the google chrome Inspect element.
I can see once i click play. How i can get using PHP or any other
Thanks
Try
openload api ( Link -
https://openload.co/api )
First you need to generate an authenticated ticket using this url
https://api.openload.co/1/file/dlticket?file={file}&login={login}&key={key}
where , file = nLFGFH8VuZs ( in your case )
You will get ticket in JSON format
Second, to generate download link using below url -
https://api.openload.co/1/file/dl?file={file}&ticket={ticket}
You will get the download link in JSON file
(eg) url : " https://1fiafzt.oloadcdn.net/dl/l/5qcL-TC0FIr7GgUX/nLFGFH8VuZs/VELMA2017RIPN15.mkv.mp4"
you dont need that!
Just change /embed/ to /f/ and then download it with the download butten on openload
embed:https://openload.co/embed/nLFGFH8VuZs/
non-embed:https://openload.co/f/nLFGFH8VuZs/
Related
My site has a feature where users can upload a link to their google docs file. What I want to do is list all the uploaded links in a place. While doing that I need to show the name of the file that is associated with the link.
I can extract the file id from the link and make sure the link is of google docs. Now I need to find a way to get the filename from that. I tried going through the google developer API for google drive, but it is for uploading/doing anything only on the authorized docs. My issue here is, my users upload the files manually to their docs which I have no control over. All I get is a sharable link and somehow get the name out of it. In addition, a thumbnail will also help.
I have tried doing this, but it throws error
$url = "https://www.googleapis.com/drive/v3/files/1G6N6FyXzg7plgEtJn-Cawo5gbghrS8z9_j_cvVqcEDA";
// and
$url = "https://docs.google.com/document/d/1G6N6FyXzg7plgEtJn-Cawo5gbghrS8z9_j_cvVqcEDA/edit?usp=sharing"
$html= file_get_contents($url);
print_r($html);
A dummy link for anyone willing to help: https://docs.google.com/document/d/1G6N6FyXzg7plgEtJn-Cawo5gbghrS8z9_j_cvVqcEDA/edit?usp=sharing
Since we are getting the URL to the file, we can do a couple of things -
get the id to the file
get what type of file is that
Before I explain how to do that, it is better to know that there can be 2 possible situations. One the file is a google docs file, the other google drive file. Those both start with different URLs.
$url = explode('/', Str::after(
Str::after($request->url, 'https://docs.google.com/'), 'https://drive.google.com/'
));
I am using 2 Str::after() to remove the unnecessary part from the URL. Then I am using explode to convert the URL into an array.
Since we have excluded the useless part from the URL, we are left with document/d/1G6N6FyXzg7plgEtJn-Cawo5gbghrS8z9_j_cvVqcEDA/edit?usp=sharing in an array form.
So, if we try to do $url[2], we get the id of the file. Also, "document" is also a good thing to note about. I use those to show proper images. There can be 5 different types of them (4 for google docs and 1 for google drive). Those are - document, spreadsheets, forms, presentation for google docs, and file for google drive. I would recommend everyone store these in the database so that extra calculations are not necessary while displaying it.
Now, to answer the actual part of the question. How to get the name. I have created a new model method to handle that.
public function name()
{
$key = config('app.google_api_key');
$url = "https://www.googleapis.com/drive/v3/files/{$this->file_id}?key={$key}";
$response = Http::get($url)->json();
return $response['name'] ?? 'Private File';
}
Don't forget to add your Google API key in the config file app.php (You need to create one). You can get your API key from Google Developer Console and create a project-specific key. Just to note that this key need not be belonging to the user of the URL.
Also, a thing to note here is that $response returns error code if the file is not set to visible to the public or the file is deleted.
I have a image temp/example.png in my local project folder. I would like to share this image on my facebook timeline using facebook's php sdk. I found this url
. So, I formed my share post url string as given below:
var $shareUrl=https://www.facebook.com/dialog/share?app_id=xxxxxx&display=popup&href=https://localhost/PhpProject1/temp/example.png&redirect_uri=https://localhost/PhpProject1/success.html';
echo '<button style="width:70%;background-color:#4267B2;color:white;border:none;height:35px;">Share on Facebook</button>';
Then I called this url on button click but, I got 'href should represent a valid URL' error. Here PhpProject1 given in url is php project on my system. I tried to solve this but, not succeeded. So, pleas help me in solving this.
Thanks in advance.
I'm trying to scrape a website (www.glturk.com).
When I run the below link via a browser:
http://www.glturk.com/ajax.aspx?stream=live&type=free&ppoint=ATVTurkiye_LR
I get the following response:
http://38.117.88.248:7777/ATVTurkiye_LR.m3u8?user=sglsxxdewfiduaqygnbfnqwcuc55&session=e0e8f5e6dbfb83be9e4f1155454b43d14130b7e79528a6fbe8dcb832c9f2cef0fbecdaf0092c93ab9826978c8d46626c20ba4293a32569e6e7cfbbd9d61c69ad
The above M3U8 link works perfectly in that instance.
But, if I try to replicate this via a PHP file, I get a very similar result, but that m3u8 link does not work?!
<?php
$channelURL= 'http://www.glturk.com/ajax.aspx?stream=live&type=free&ppoint=ATVTurkiye_LR';
$actualLink = file_get_contents($channelURL, TRUE);
echo $actualLink;
?>
The result I get is:
http://38.117.88.249:7777/ATVTurkiye_LR.m3u8?user=sglspoqmpdi2tltn0lynorytlnvi&session=08e5fd64dca2f17d9e4f1155454b43d136fa14cb989a57687b29865e85d60962253ac665a78595d7c5529895b22236c2f32018226b4a15e9b8327f16597d3505
This m3u8 does not work though, I can't understand why.
Working (via direct link through browser):
http://38.117.88.248:7777/ATVTurkiye_LR.m3u8?user=sglsxxdewfiduaqygnbfnqwcuc55&session=e0e8f5e6dbfb83be9e4f1155454b43d14130b7e79528a6fbe8dcb832c9f2cef0fbecdaf0092c93ab9826978c8d46626c20ba4293a32569e6e7cfbbd9d61c69ad
Not Working (via PHP):
http://38.117.88.249:7777/ATVTurkiye_LR.m3u8?user=sglspoqmpdi2tltn0lynorytlnvi&session=08e5fd64dca2f17d9e4f1155454b43d136fa14cb989a57687b29865e85d60962253ac665a78595d7c5529895b22236c2f32018226b4a15e9b8327f16597d3505
Any advise would be appreciated :) Thank you!
I've searched everywhere but cannot find an answer. I am using flowplayer and amazon s3 with PHP. The link works in the browser if I copy and paste but it appears flowplayer doesn't like query strings. I tried replacing the html entities then url encoding it. I just tried url encoding it. I just tried removing the & and replace with & etc. None of these worked.
My goal is to play a url signed video from amazon s3 using flow player.
I know I have no code to display because none of it is 'right' but does anybody have any suggestions? They would be much appreciated.
I had this same problem, and discovered the answer by reading the ActionScript source code for the Flowplayer cloudfrontsignedurl plugin:
http://flash.flowplayer.org/documentation/developer/development-environment.html
private function _getUrl(clip:Clip):String {
var url:String = clip.getPreviousResolvedUrl(this);
var isRTMPStream:Boolean = url.toLowerCase().indexOf('mp4:') == 0;
if ( isRTMPStream )
//gets the url, minus the "mp4:" at the beginning
url = url.substr(4);
//gets the expires time in seconds
var expires:Number = Math.round((new Date()).getTime() / 1000 + _config.timeToLive);
//generate the signed url
var signedUrl:String = _signedUrlGenerator.signUrl(url, expires);
//put the 'mp4:' back on the front
if ( isRTMPStream )
signedUrl = 'mp4:'+ signedUrl;
return signedUrl;
}
Notice how it removes the "mp4:" prefix before signing the url, then adds it back on afterward.
I followed Amazon's example, here: http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CreateURL_PHP.html
Then the relevant parts of my JavaScript config look like this:
var netConnectionUrl = "rtmpte://amazon_distribution_domain_name.cloudfront.net/cfx/st";
var clipUrl = "folder/folder/videofile.mp4";
$.post('/path/getSignedUrl.php', {clipUrl:clipUrl}, function(signedUrl){
clipUrl = 'mp4:'+signedUrl;
...then add netConnectionUrl and clipUrl to Flowplayer config...
});
I preferred to use PHP instead of the Flowplayer plugin so that I could also check to make sure the user is logged in and owns the product, etc., before signing the URL, and was able to do my domain and IP address checks with PHP also without needing to fuss around with compiling with Ant or Flash Builder. And this way the private key stays off of the client. Using the plugin would mean that pirates could possibly steal the SWF file, but by using AJAX and signing the url on the server, means it's impossible to steal.
Use this extension to make a signed URL and make sure that it works
Make sure the path is correct, that is local or global path....
Try to play an unsigned URL, then after that works flip to a signed URL
I need to get the XML data from youtube for a particular video(based on ID) and fetch the thumbnail url. I am using PHP.
The code is as follows:
<?php
//$xmlFilePath = 'http://localhost/testFile.xml'; //This works..
$xmlFilePath = 'https://gdata.youtube.com/feeds/api/videos/5P6UU6m3cqk?v=2';
$dataFromYoutube = file_get_contents($xmlFilePath);
print_r($dataFromYoutube);
?>
I dont get any data. The output is blank. If I load the url 'https://gdata.youtube.com/feeds/api/videos/5P6UU6m3cqk?v=2' in browser and copy the content to a file(http://localhost/testFile.xml), then the above code works.
I have tried fetching the youtube data using ajax and also simlexml_load_file function in php. But the result is blank/empty for Youtube url. However, I get the data for 'http://localhost/testFile.xml' in both cases.
How can I fetch youtube data using php?
Please help.
well, your code is correct and works fine too. It may be that your apache server is not configured for "https". So just check it once too.