I want to implement a website which like Youtube, these real URLs of videos has to be hidden.
When a user comes in, and the PHP webpage will authenticate the user, and redirect that user to the real URL of the video. The problem is how can I redirect URL and hide its real video URL, or other ways to prevent the real URL of videos exposed?
I don't know if I got your point, but are you looking for something like this?
$video_url = $user_is_authenticated ? $video_url : $authentication_url."?returnUrl=".$video_url;
echo "<a href='$video_url'>Video Title</a>";
This way, if the user is authenticated, you send him the real video URL, otherwise the login page would be seen instead.
If you don't want users to see the URL you can use session variables during authentication.
You want to hide the video location, I guess. Make a script to feed your video to your front.
feed.php?video=id
This will read your video file based on the video id and return it with propper headers to your frontend player.
URL bar can be hidden using JavaScript in InternetExplorer using window.open method.
And that will work only in InternetExplorer. And remaining browsers dont allow you to hide address bar, as per security issues.
Related
I have an empty page, that does one custom tracking function, then redirect back to facebook.
http://example.com/promotion/?promotion-id=12
What's inside the link is:
if(isset($_GET['promotion-id'])) {
addTracker($_GET['promotion-id']);
}
header('Location: http://facebook.com/promotionexample') ;
The problem is, when I share the link http://example.com/promotion/?promotion-id=12 to facebook, Facebook processed it and change the link directly to http://facebook.com/promotionexample.
I understand that this is a mechanism to share bit.ly or any other url shortener. But is there any way to avoid it?
I made a pdf ebook where I embeded a link to a youtube video I uploaded.
on youtube stats, it shows that my traffic source is unknown.
I know this is hurting the seo of my video. This is why I am trying to enhance my youtube seo by making the visitors who come from my pdf looks like comming from facebook.
I know this is called faking the referral but I don't know if this can be done through this way:
1 _ user click on the link embeded in the PDF.
2 _ the user get redirected to "myscript.com".
3 _ "myscript.com" will redirect the user to youtube.
4 _ youtube stats show traffic comming from facebook.
please, if you know anything about this, help me.
This isn't possible. You can fake the referrer in your own browser, but you can't force someone else's browser to fake it.
What your solution will do is show the referrer as being your own website. That may still be better than it seemingly coming from nowhere. But, on the other hand, it may not. I'm no expert on the way that Youtube SEO works. I suspect, though, that anything which attempts to deliberately manipulate it is likely to hurt rather than help you. Let your content be its own best advert.
If you're determined to go down this route, though, an alternative solution would be to set up a Facebook page and embed the video in that. Then make the Facebook page the destination of the link in the PDF. That way, the referrer for the video really will be Facebook.
Faking a URL isn't going to enhance your SEO. If you want to track traffic from that ebook, use UTM tagging in that embedded URL.
I'm not sure if this will be reflected in your YouTube stats, but should be easy to track in Google Analytics.
I am building a website and I am going to add the possibility to share on Facebook, Twitter and Google +. How ever, in some of the sharing codes I have to pass the URL I want to share in a href, the Facebook one gets automatically the actual URL of the page.
My question is: this pages I'm sharing have post data, will the Facebook one work? And what can I do with the other ones that I have to do an href? Is this possible with pages that have post data? If not, what can I do?
Thank you.
You can't. Links can only include plain URLs and make GET requests.
That said, if you want to share a page on social media, it almost certainly isn't appropriate to be requiring a POST request to generate that page in the first place.
I have a problem with my fanpage. A gallery script is running a my webspace and i put it in the app also in th iframe of the Fanpage. The gallery script has get an Share button to post the photos on facebook. This part of it is running fine but when i clicked the link that was posted in Facebook i had been reffered to my page on my webspace and not to the iframe with the webpage and the photo. Is it possible to edit the link to go to this page in facebook iframe?
This is not a problem in general. You can try to redirect your website into the Facebook tab application my checking the HTTP_REFERRER and the url. You might have a look at this example
There is an URL you can try to call and see if you get redirected to the right application. Additionally, you can add app_data-parameters to the URL to identify the real target into your app.
All that can be done by the following code:
// set the target facebook page name and id to perform a forceRedirectToTab()
$tmpFbHelper
->setPageName($iniHandler->getIniSetting('facebook.'.fbHelper::getAppNamespace().'.page.name'))
->setPageId($iniHandler->getIniSetting('facebook.'.fbHelper::getAppNamespace().'.page.id'))
->setSecret($iniHandler->getIniSetting('facebook.'.fbHelper::getAppNamespace().'.secret'));
// perform a redirect to the facebook tab application if someone opens the url out of facebook
// the facebook-linter is not affected by this :)
$tmpFbHelper->forceRedirectToTab();
// perform a deeplink if for example a special url is called or you identify some app-data
$tmpFbHelper->performDeeplink();
You will have to look at your published links into the stream so that the PHP-code finds out that you will redirect and deeplink!
I hope this ideas might help you :)
I am developing an application that requires a user to view a set of videos.
How can I identify if the user has watched a particular video(complete and incomplete)?
You could embed the video on a page on your website, so you can register it that way.
You could also put a URL at the end of the video that they must follow to register they've seen the video.
I hope that the answer is "you can't" if you're talking about having watched it directly from YouTube.
You can use php's session variables, and put each video on a different webpage. Then when one video ends it redirects to another webpage and adds a value to that session. Before each page is loaded the session checks to see if the user should be on that webpage like so:
session_start();
if($_SESSION['videos']=="whatever value"){ //check to see if the session equals what value it should
$_SESSION['videos'] = 'whatever value2'; //update the value for next webpage
}
else { //if session variable doesn't equal what it should, redirect to homepage
header("Location: http://www.example.com/");
and to figure out when the video ends, just set a timer to the exact length of the video. I think you can figure that out for yourself.
Ah youtube videos. I made a YouTube Client that could do exactly what your referring to. It was a Client side URL sniffer that checked various urls for the presence of a youtube video ID. It could detect when a video was watched embedded in a site and many other places where the video could be watched.
Unfortunately, Firefox has changed their JS Engine to disallow URL sniffers, so finding if youtube videos have been watched via javascript is now out of the question. Your last option might be to authenticate the user under their youtube account and check the History. Good Luck!