Posted by deepblue_tiano 4 years 1 week ago
Hello again mobers, Can anyone help me with the wapsite that currently I'm working on.. I having trouble redirecting the phone to the streaming server because i use to count the number of clicks the user streamed the video..In my php code i used header("Location: ".STREAMING_FULL_PATH.$video->getContentProvider()."/".$video->getServiceCode()."/"
.$video->getTariffCode()."/".$video->getFileName());
where STREAMING_FULL_PATH is rtsp://ip address/ plus the directories+filename.. I really appreciate your help..thanks..




Posted by shane 4 years ago
Add a normal (a href) link to your page that will link to another page within your site.
From this second page, record the click and do a Response.Redirect (not sure what the php equivalent for redirect is) to the streaming video.
Posted by deepblue_tiano 4 years ago
shane thank you for replying to my post, currently i have a page where i count the number of view of that video and increment it but i cannot found a php script that the phone will understand as usual href, header +location doesn't work in nokia phones.
Posted by daniel.hunt 4 years ago
Mobile Grandmaster
Which Nokias in particular are you talking about? I've not had any difficulty with a php header('location: blah'); on any nokia I've tested it on. The main issue with a header location redirect is when you are dealing with form submissions.
There's an RFC that states that if a page redirects after a form submit, then the device is required to resubmit the data to the new page, which causes a little bit of confusion, as you can imagine.
Daniel HuntdotMobi
Posted by deepblue_tiano 4 years ago
I've tested it in nokia 6680 and huawei U256, the error got in nokia is web page not found,while in huawei cannot find file.. Okay let me explain to you.. I have a page where i have a link preview and view.. the link preview is usual href="rtsp://IP ADDRESS/file.3gp while in view i uses another page which is php to count the number of views of the specific video..I uses header("Location: "rtsp://IPADDRESS/tFileName.3gp) to send back the link to phone but i believe the interpretation of phone being sent by header is not a link beacuse of rtsp? What do you think?. It works fine in motorola and LG only in nokia and huawei doesn't..
Posted by elias 3 years ago
Hi,
try with http 302 (temporary move) and add a Location header with the rtsp uri. This is a client redirection and works with Nokia, SE, Moto, LG, Sharp, Samsung devices.
Elias Giannopoulos
Elias GiannopoulosPosted by alen_ribic 3 years ago
Daniel,
How do you go about preventing mobile users from reloading the posted data?
The reason I'd like to do a redirect after user POSTs form data is so that he, she can't reload the form submission. (which could result in duplicate data, etc.)
Regards,
-Alen
PS:
m.facebook.com seems to pull it off. They use post method for login and if I try refreshing the next screen in pc browser, I don't get the "The page you trying to view contains POSTDATA..."
Posted by daniel.hunt 3 years ago
Mobile Grandmaster
That's actually quite a common procedure with modern CMS's. If you notice, you'll see its also done on this site by Drupal :)
The main issue with what you're asking (and the one that I came up against myself) is that the RFC states that every browser should obey the following RFC: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
Desktop browsers appear to ignore this for what I presume are usability reasons (and, in my opinion, rightly so). However on mobile devices, it appears as though this RFC is adhered to strictly, making what you want to do impossible.
Does this help you? I assume you're talking about form submit redirects on mobile devices in general by the way, even though you specifically mentioned a desktop browser for m.facebook.com.
Daniel Hunt
Daniel HuntdotMobi
dotMobi
Posted by alen_ribic 3 years ago
Thanks Daniel for your reply.
I can't say I have read the RFC 2616 before in much detail, but I was almost convinced that it was recommended to do a redirect after a POST. Guess I was wrong.
Here is an example of one recommendation, though it probably does not take mobile browsers in to consideration:
Source: http://www.djangobook.com/en/1.0/chapter07/ (Python web framework)
As per what I wrote in my first reply and a quote above, its not just for usability reasons that the HTTP redirect after POST is useful, but also to prevent users from doing a refresh on data that has already been posted.
(Submitting a form twice or more times.)
So that's the part I have been seeking a same or similar solution for in mobile space.
Oh and I tried the post with 302 redirect on a Opera mini 4.1 browser and it actually is the only mobile browser that it works fine with. (Not good enough since I need to support more then just Opera mini so I'll stick to just doing a post and then rendering a follow up page instead of a redirect to the follow up page.)
Regards,
-Alen
Posted by daniel.hunt 3 years ago
Mobile Grandmaster
I'm not exactly well-versed on HTTP RFC either ;)
I understand what you're trying to do, and I also understand why you're trying to do it (I've done this exact thing on countless custom CMS implementations I've developed too). The holding page approach is probably your best bet for what you're trying to do, however you should remember that users will actually be paying for the data transmitted both to and from your server, so they may not like having to pay for the data required just to get past a holding page.
Also, its quite likely that they're accessing your site via a very slow connection, so downloading a holding page is (again) undesireable for them!
There are pros and cons to every approach, but I'm sure you'll pick the one that suits you most.
Daniel HuntLet me know how you get on!
dotMobi
Posted by alen_ribic 3 years ago
Thanks again for your reply and I am happy to have gotten this one out
of the way for now.
Holding page (Without 302 or 301 redirect) is the way I decided to go from here in case of POST method handling.
And you are absolutely right that both have pros and cons. Holding
page approach though outweighs the redirect in mobile scenario.
-Alen
Posted by creative96me 3 years ago
Hi to all! I have the same problem with Location + rtsp link. If you have any solutions - help,please!!!
Does it mean:
<?php
header("HTTP/1.1 302 Found");
header("Location: rtsp://86.57.251.29/video/14530.3gp");
?>
Posted by arcade 3 years ago
That could ba a good answer about mz problem too!!!
http://mobiforge.com/forum/developing/mobile-web-development/header-redirect-405-error-nokia-6070
Anyone in to tell me???
Posted by arcade 3 years ago
See http://mobiforge.com/forum/developing/mobile-web-development/header-redirect-405-error-nokia-6070
Posted by pulsorock 2 years ago
I'm having this same problem. I've created a .php script that does some user account validation, download tracking to the DB (for analytics of the videos viewed) and the method of viewing (stream or download).
This is the last part of the code that makes the redirect:
<? // Filename define from DB. ie: $video_file = "file.3gp"; switch ($download_method) { case "stream": $server_host = "rtsp://192.168.1.120:554/"; break; case "download": $server_host = "http://192.168.1.120:8134/"; break; } // Redirect to video URL $redirect_url = $server_host . $video_file; header("HTTP/1.1 301 Moved Permanently"); header("Location: ".$redirect_url); exit; ?>I've read the posted comments and the links, but haven't found a way to accomplish a redirect to a rtsp:// using PHP on my phones.
Is that even possible at all?
Posted by xiaopy12 1 week ago
Louis Vuitton Outlet Onlineliubhu