I'm having some trouble streaming video for iOS using PHP. The problem lies in the architecture of the system. I'll explain. We have a public facing website that gets its data from a non-public-facing server. Let's say we have these urls:
public.website.com - public website 1.2.3.4 - private server
I've seen examples of using byte range requests (http://www.matheretter.de/test/ipad/test-byterange-2.txt and others) that work when I hit the server directly in a testing environment (1.2.3.4/stream-video.php), but that's not something I can do in production. So what happens then is a user comes to the site and the video src in the video tag is something like this:
public.website.com/getvideo/video-wrapper.php
video-wrapper.php then makes a curl request (or fopen or fsockopen...tried many things) to the private server, something like
1.2.3.4/stream-video.php
As I said, 1.2.3.4/stream-video.php works if I use that in the video src but when called from video-wrapper.php, I get "video not found" errors. There's something in that handoff from private server to public website that gets lost. I can output the same headers as stream-video.php but it still just never works.
Every example I've seen of this assumes that the local call to public.website.com/getvideo/video-wrapper.php can read the file, but that isn't the case here. I have to make a call to the private server to get the file and then output that to the website. Does anyone else have a set up like this? Or has anyone seen something similar. Pretty much at my wits end on this one.
I can't provide a url but I can provide code samples of non-working code if need be.
Thanks.