09/10/2018, 18:11

Nghe nhạc, xem phim trực tuyến - Ai biết chỉ giúp???

Làm sao viết code php để có thể nghe nhạc hay xem phim trực tuyến trên web luôn? Chẳng hạn như http://www.tialia.net .
COTTONBELLY viết 20:15 ngày 09/10/2018
Một script khác cùng chức năng tương tự nè bạn , có thể download vìa chạy thử
http://66.98.135.66/forum/index.php?...15#&entry41902
doibuonthe viết 20:15 ngày 09/10/2018
nhưng cái này phải đòi hỏi host có cái gì nữa đó mình đã thử trên ba cái hót mà vẫn ko chạy được
doibuonthe viết 20:23 ngày 09/10/2018
với lại him chỉ cho sử dụng 30 ngày hà
minhhieu viết 20:13 ngày 09/10/2018
Dễ thôi mà, chỉ cần biết đường dẫn URL của file nhạc và format file nhạc đó ta có thể sinh mã HTML để nghe nhạc online.
Nếu file thuộc loại Media Audio(WMA, WMV, MP3, MIDI, WAV, AU và nhiều format khác) mã HTML là:

Code:
<Embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"
name="TSplay" 
src="http://www.somewhere.com/something.wma" ShowControls=1 
ShowDisplay=1 ShowStatusBar=1 width=250 height=76 autostart="false" ></Embed>
Nếu là Media Video file(WMA,AVI...):
Code:
<EMBED src="http://www.somevideo.com/video.wmv" 
AutoStart="true" ShowStatusBar="true" width=310 height=300></center>
Nếu là file format Real Audio(.RM,.RAM):

Code:
<embed src="http://www.somewhere.com/something.ram"width="175"height="50" 
CONTROL=ControlPanel
 autostart="true" loop="true" type=audio/x-pn-realaudio-plugin></embed>
Nếu là file format Real Video:

Code:
<embed width=350 height=36
src="http://www.somewhere.com/file.ram?embed" autostart=true 
nojava=true controls=ControlPanel console=two>
Mã trên có thể tùy biến theo cách của bạn và nhớ gán giá trị cho thuộc tính src bởi đường dẫn URL tới file nhạc(hoặc video) đó.
File nhạc này có thể ở server của bạn hoặc chôm từ website khác.
Để nghe được nhạc format Media Audio hoặc Media Video cần cài Windows Media Player.
Để nghe được nhạc format Real Audio hoặc Real Video cần cài Real Player.

Đó là vấn đề cơ bản, còn về lập trình Web ra sao thì tùy mỗi người.
Bài liên quan
0