I am confronted with a very simple problem but I couldn't find any solution or piece of information through the internet.
I have a camera sending a video stream to an Ubuntu server (with fixed IP 192.168.1.100), through the port 8081, and I would like to "capture" this stream to display it inside a nice HTML page.
From inside my local network, I simply use the HTML iframe tag as follow and it works fine:
<iframe src="http://192.168.1.100:8081"></iframe>
However, here is the problem:
from outside my local network, my webpage is correctly accessible through my domain name but the iframe stays empty. I believe the reason is (correct me if I am wrong) that since the HTML code is executed in the browser, the address "http://192.168.1.100:8081" of the iframe tag doesn't point to my server anymore.
Therefore, the first thing I tired is to replace the previous iframe tag with the following one:
<iframe src="http://MY_DOMAIN_NAME:8081"></iframe>
However, this cannot work because I didn't forward the port 8081 of my router (and I cannot do it because otherwise everybody will be able to see my video stream without any access control).
Do someone have any idea about how to proceed ? More precisely, how can I access my video stream (embedded in an HTML page) from both, inside and outside my local network ?
Just to make sure I understand you, you want outside access to a LAN stream on your internal network, but don't want to open an external port on your router so that you can broadcast it out to the world, such that you would be able to view it from the outside.
You need to either have the stream saved as clips on your Ubuntu server and require a login to access from your server, externally, via a .php file makes the html document to allow viewing of recent clips of the stream; or, give up on viewing it externally from your network.
Cheers!
Related
I am learning HTML, and whenever I execute the href function in HTML and click the blue text, the browser tries to redirect me to a folder inside my computer, when in reality I want to enter a website. For example, if I try to execute the following code, instead of the browser redirecting me to duckduckgo.com, it tries to redirect me to a folder inside my computer:
Browse anonymously and without being traced
How can I solve this issue?
Because href="duckduckgo.com" is using a relative URL, so the browser is looking for duckduckgo.com relative to the current URL that is displaying the page. To the browser it's no different than if you used href="index.html", both are structurally identical.
Instead, use a fully-qualified URL:
Browse anonymously and without being traced
You can also default to the current protocol with this:
Browse anonymously and without being traced
So if the current page is open via http:// or https:// then the link would use the same in the resulting request. Note however that your description of "a folder inside my computer" may somewhat imply that your current protocol could be file://, in which case an inferred protocol clearly wouldn't work. The point is, the structure of a complete URL is pretty versatile so you have options.
I created a website that I am hosting at a local server and I bought a domain at one.com that I am redirecting to the IP address of my server using web DNS.
When I put the IP address in the browser everything works fine. However, when I type the name of my domain, the website is loaded but the title and favicon are not displayed.
Inspecting the source code in the browser I realized that my index.html is injected into the body of a new html document using iframe, which includes a new head element with a different title and without the favicon. I have tried with no success to dynamically change the title using javascript as:
<script>
document.title = "my title";
</script>
I have also tried to delay this function using setTimeout() with the same result. I am a noob, so this might be something very trivial but I haven't been able to find a solution. Any help would be appreciated.
Your page is executed within an iframe. To access the parent, you should be able to use:
window.parent.document.title = "A damn good title"
update
Due to the fact that main document and iframe are not from the same origin, and the CORS headers can't be set, the above won't work.
Apparently the cheap DNS provider does not allow you to configure the entries (that would have allowed you to point the domain name directly to your IP address), the only option remaining is to move to a better provider.
I've just created a flash video that loads content from a specific URL, in localhost.
Let's say that my url is "http://localhost/mysite/index.php"
Now, while debugging it into flash professional all works fine, but my problem is that I (if possible) want to use the published .swf file NOT inside an html page, but as-is.
This because I have to load it inside a specific software.
Obviously when I try to execute it, it cannot load my remote page, unless I reach it in the blowser.
Is there a solution?!
Thanks...
Update: these are my trusted locations
i have a situation where i want to load different webpages in a browser where the URL will be passed over the web-sockets.
Now the problem is, if inside one html page which is connected to the sockets server, it receives a command to redirect to another url, the socket connection is lost and it is not possible for the new page unless it has this socket functionality built in it.
One idea is to use a main page with inlineFrame where i keep changing the pages while main page remains connected to the socket server.
I want to know, is there more efficient way of doing this task where i am supposed to received url commands over the socket but idea is to avoid iFrames??
It sounds like your main page is acting like a web browser. It gets a new URL and then loads a real page based on that. You need something to maintain state and control which page is loading and the only way to maintain state with WebSockets is to keep that page open and the connection established.
The only solution I can see is the IFRAME one that you have suggested.
Great question!
I was thinking about this too.
To fix all the links do something on the server or client side
Loop this (code is sketchy, but its the right idea):
DOMObj = Your Data Object with page content
i=0
linkArray[i] = DOMObj.getElementsByTag('a').firstChild[i]
DOMObj.getElementsByTag('a').firstChild[i].href = "href='serverLoad(linkArray[i])'"
I have to display the content of an HTML file which is hosted to some other server in a classic ASP page.
I know using #include tage we can embed suchc html file provided they resides in same server, it can not refer to an external urls.
Another way out is to use iFrame, but the problem with that is the user can right click on th page and check URL property of the iFrame, which is not acceptable as the URL where html resides is our third party file hosting environment which we dont want to be exposed for the security purpose.
Note: This html shows some .swf file whic shows some large .flv files hosted on the third party hosting environment.
Any ideas ?
Nikhil
No matter what method you use the end user will be able to see where the request is made, e.g. Fiddler, Firebug. I think iFrame is your best bet.
You can try capturing the HTTP stream from the remote page and injecting into your local page. I don't know offhand how to do it in PHP, but you'd use the CFHTTP tag in ColdFusion to accomplish this.