Bonjour,

J'ai actuellement une application PHP qui permet à un utilisateur de sélectionner et écouter de la musique, avec :
  1. Une page web blanche (musicbot.php) ouverte sur le site dédié est associé avec un MusicBot (TeamSpeak).
  2. Une autre page web où l'utilisateur choisit une radio/musique sur youtube etc...
  3. Dans le pire des cas 30s plus tard un popup s'ouvre avec l'url de de l'utilisateur choisie au niveau du site dédié pour faire écouter à tout le monde la musique choisie sur TeamSpeak.


Donc, tout est en PHP avec une BDD pour mémoriser le lien et dire s'il faut changer le popup mais je n'ai rien en direct.

J'aimerais donc savoir s'il est possible de faire cela en Java ?

Voici à titre d'information, le programme en PHP :

musicbot.php
Code php : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
include 'config/dbconfigts.php';
$query = ' SELECT url,id,changement from musicbot';
$result = mysql_query($query);
                     while ($row = mysql_fetch_object($result)) {
                     if($row->id==3){
                      $liens=$row->url;
                      $changement=$row->changement;
                     }
                     }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">    
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<META HTTP-EQUIV="REFRESH" CONTENT="30"> 
<head>
<link href="style.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<?php
if ($changement=='oui'){
?>
<body>
<SCRIPT language="javascript">
       var w;
       w=window.open("<?php echo $liens?>","nom_popup","width=200, height=200");  
       window.opener.reload();
</SCRIPT>
<?php
Mysql_query ("UPDATE musicbot SET changement='non' WHERE id='3' ");
}
?>
index.php
Code php : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
include 'config/dbconfigts.php';
 
if (isset($_POST['url'])!='') { 
        if ($_POST['url']!=''){
$liens=$_POST['url'];
Mysql_query ("UPDATE musicbot SET url='".$liens."' WHERE id='3' ");
Mysql_query ("UPDATE musicbot SET changement='oui' WHERE id='3' ");
}
}
$query = ' SELECT url,id from musicbot';
$result = mysql_query($query);
                     while ($row = mysql_fetch_object($result)) {
                      if($row->id==3){
                      $liens=$row->url;
                      }
                     }
?>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">    
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<link href="./css/style.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<?php
 
$lien='http://37.59.41.28/provi/index.php';
echo '<FORM Method="POST" align="right" valign="middle"  name="Form" Action='.$lien.' >';
echo '<table cellspacing="1px" align="center">';
echo '<tr>';
echo '<td align="center">';
echo '<font style=color:white;font-size:30px>';
echo 'La Radio/Music en cours est ';
echo '</font>';
echo '</BR>';
echo '<font style=color:Yellow;font-size:30px>';
echo $liens;
echo '</font>';
echo '</BR>';
echo '<font style=color:red;font-size:16px>';
echo 'Attention actualisation de votre choix de Radio/Music tout les 30secondes!!';
echo '</font>';
echo '<font style=color:#2EFEF7;font-size:16px>';
echo 'Merci de patienter';
echo '</font>';
echo '</br>';
echo '&nbsp;';
echo '</br>';
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td align="center">';
echo '<font style=color:pink;font-size:25px>';
echo 'Exemple d\'URL pour choisir une radio:&nbsp;';
echo '</font>';
echo '<a href="http://www.ecouterradioenligne.com/" target="_blank" ">';
echo '<font style=color:#2EFEF7;font-size:25px>';
echo 'http://www.ecouterradioenligne.com';
echo '</font>';
echo '</a>';
echo '</br>';
echo '&nbsp;';
echo '</br>';
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td align="center">';
echo '<font style=color:#DBA901;font-size:35px>';
echo 'Entrez la nouvelle url pour changer la Radio/Music';
echo '</font>';
echo '</br>';
echo '<input type="text"  style="width:600px;border-radius:5px" name="url" value="'.$liens.'" maxlength="250"/>';
echo '</br>';
echo '<INPUT type="submit" class="bouton" name="modifier" value="Envoyer"/>';
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</FORM>';
?>
</body>
</html>
Merci d'avance pour toutes vos idées et votre aide.