How can I hide an iFrame src from intruders
let's say i'm streaming my webcam or my pc screen and this is the iframe code:
<body>
<iframe src="http://streamingplatform.tv:69420/player.html" name="player" width="800" height="450" scrolling="no" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen="true"></iframe>
</body>
and I don't want it to show the streaming URL in page source and inspect feature on most browsers!
meaning i want to protect the URL i don't want anyone knowing where i'm streaming from, for most peeps at least.
I heard it can be done in Ajax but I don't know how
You cannot hide this information in any meaningful way without:
Using https to secure the page with SSL, and
Requiring authentication
...both on the page containing the iframe and on the resource the iframe streams (which only uses http in your example).
If you do those two things, then only people who have authentication information (username and password or similar) will receive the page, and the page information will be hard to spy on as it passes through the network from your server to your browser (thanks to SSL).
This will only be as good as the SSL and authentication, of course. If you use an outdated certificate with weak encryption, you lose the benefits of SSL; and if you use an easily-hackable authentication (easy to guess username and password, etc.), you'll lose the benefits of authentication.
You can hide the real URL by using Reverse Proxy.
According wiki Reverse proxies can hide the existence and characteristics of origin servers.
This approach enable to use some URL assigned to proxy server, but in case client browser connect to this address the proxy server will establish connection to the real server and and provide content to browser. So client can not discover the real server URL, but able to receive it's content.