Jump to content
culay

[Ajutor] Php

Recommended Posts

Salut,am si o problema legata de php!

Site-ul este de hosting fisiere,si vreau sa adaug player ca la fiecare melodie/clip .mp3/mp4/avi/ sa se poata fie vizualizat/ascultat online!

Am incercat cu JwPlayer 5.4 merge totul perfect,doar ca am reusit doar cu un path exact "exemplu:files/music.mp3"Am incercat cu mai multe comenzi genu:

<?=$w ?>

files/$imageID

etc

etc

Dar nu am reusit!

Va prezint codul complect care vine in pagina ca sa poata fie vizualizat!

<!-- START OF THE PLAYER EMBEDDING TO COPY-PASTE -->

<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="328" height="200">
<param name="movie" value="player.swf" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="file=video.mp4?=preview.jpg" />
<embed
type="application/x-shockwave-flash"
id="player2"
name="player2"
src="player.swf"
width="328"
height="200"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="file=video.mp4?=preview.jpg"
/>
</object>
<!-- END OF THE PLAYER EMBEDDING -->

Acest cod este cod-ul exact care mil da JwPlayer!

O zi/noapte buna la toti!

Edited by culay
Link to comment
Share on other sites

  • Moderators

<?php
$link = 'http://site.ro/arhiva/melodie.mp3';
$sir = explode(".", $link);
$nel = count ($sir);
$poz = $nel - 1;

//Audio
if (($sir[$poz] == "mp3") || ($sir[$poz] == "mid"))
{
//codul tau pentru audio aici
}

//Video
if (($sir[$poz] == "avi") || ($sir[$poz] == "wmv"))
{
//codul tau pentru video aici
}
?>

E ok asa?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...