Is there a way to send a streaming url such as mms or asx through mysql or a php file so that it does not appear in the source code?

Dani AI

Generated

Short answer: you cannot 100% hide a playable stream URL from the client. The player (Windows Media Player or a browser plugin) needs a reachable endpoint or the media bytes; anything you send to the client can ultimately be discovered. was essentially right, but there are practical ways to reduce exposure and stop casual copying.

A pragmatic workflow for is: keep only an internal ID in MySQL, authenticate in PHP, then either (A) generate a short-lived signed URL and give that to the player, or (B) redirect the client to that signed URL. Signed, time-limited URLs prevent long-term reuse even though the address is visible briefly. CDNs and clouds document this pattern for private content (for example, AWS CloudFront signed URLs) [https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-urls.html].

If you need the client to see only your domain, proxy or re-stream on the server (for example, have stream.php?id=123 authenticate and pipe the stream). This works for HTTP/HLS but is resource intensive and may not support legacy protocols like mms/ASX well. For production use, run a media server (NGINX RTMP, Wowza, etc.) that supports authenticated ingest/relay and scales better than pure PHP [https://github.com/arut/nginx-rtmp-module].

For serious protection (preventing copying and controlling playback) you need DRM: license servers, client support, and a media pipeline (Microsoft PlayReady, Widevine, FairPlay). DRM is complex and usually delivered through services such as Azure Media Services [https://learn.microsoft.com/en-us/azure/media-services/latest/content-protection-overview].

Practical next step: store stream metadata in MySQL, have PHP check permissions, then issue a short-lived signed URL or proxy only if necessary. Don’t rely on client-side obfuscation — use tokens, CDN signed URLs, or DRM depending on how strong protection you need.

Recommended Answers

All 2 Replies

I'm not that familiar with streaming video but I'm quite sure that if you want the browser to show something, you must tell it where it is. The browser then determines what to do with it, so it can show that code to the user if they want.

All you can do is make it slightly harder to find by putting the URL in a JavaScript file in some form that you link to in your HTML. EG make a function that initiates the streaming and call it onLoad.

Yea I have it with JS but don't understand it so I'm not sure how to add features to my site without redesigning the php.
I was hoping to store the streams in a database then get called by windows media player.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.