Jump to content

Implement PHP into Java


darkapec

Recommended Posts

I just posted a topic on here about sorting php array alphabetically, the solution was posted so quick I decided to post this as well and maybe save some of my time. So I have this javascript

 

<html>

<head><title>Darkapec Movie Player</title>

<script type="text/javascript" src="ss1.js">

</script>

</head>

<body>

<h1>Darkapec Movie Player</h1>

<b>Video location  :</b> :wtf:<input type="text" id="id4"/> :wtf:

<input type="button" onclick='ld()' value="Load" /><br/>

<div id="id1"></div>

<div id="nowt"></div>

    <script type="text/javascript">

    function ld(){

    document.write("<html><!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN\"http\:\/\/www.w3.org\/TR\/html4\/loose.dtd><html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\" xml:lang=\"en\" lang=\"en\"><head><title>Darkapec Movie Player</title><script type=\"text\/javascript\" src=\"ss1.js\"><\/script><script type=\"text\/javascript\" src=\"fun1.js\"><\/script><\/head><body><h1>Darkapec Movie Player<\/h1><br/><embed type=\"application/x-vlc-plugin\" name=\"video1\" id=\"vlc\"  autoplay=\"yes\"  loop=\"no\"  width=\"640\"  height=\"480\"  target=\""+document.getElementById("id4").value+"\"/><div id=\"nowt\"></div><div id=\"id1\"></div><div id=\"id2\"></div><script type=\"text\/javascript\" src=\"fun1.js\"><\/script><br/><input type=\"button\" onclick='pl()' value=\"Play\" /><input type=\"button\" onclick=\'ps()\' value=\"Pause\" /><input type=\"button\" onclick=\'st()\' value=\"Stop\" /><input type=\"button\" onclick=\'vlc.audio.toggleMute()\' value=\"Mute\" /><br/><b>width  :</b><input type=\"text\" id=\"i1\"/><br/><b>height :</b><input type=\"text\" id=\"i2\"/><br/><input type=\"button\" onclick=\'aspectRatio()\' value=\"Adjust Screen\" />");

    }

    </script>

<br/>

</body>

</html>

 

I have put 2  :wtf: enclosing the code where I would like to implement the following PHP script

 

<?php

$dir="/backup/Movies";

$files = array();

if ($handle = opendir($dir)) {

while (false !== ($file = readdir($handle)))

{

if ($file != "." && $file != ".." && $file != "index.php" && $file != "New Movies" && $file != "Icons" && $file != "Tv Shows")

{

$files[] = $file;

}

}

closedir($handle);

}

sort($files)

?>

<form action="listen.php" method="post" name="table">

<select name="Movie">

<p>

<?php

$tmp = array();

foreach ($files as $file) {

$tmp[] = "<option value='$file'>$file</option>";

}

echo implode("\n",$tmp) . "\n";

?>

</p>

</select>

</form>

 

Thanks again for the help

Jake

Link to comment
https://forums.phpfreaks.com/topic/233782-implement-php-into-java/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.