html5 player

yy this i want but all this player will be in one file and in post what i need to put to echo the id???

There are many ways to get an id.

  1. Get it from a PHP $_GET variable then echo that out.
  2. Use jQuery / javascript to replace the id of the target.
  3. Use Cookies and use the stored variable in that.
  4. Use Sessions and use that variable.
  5. Use $_POST function and get variables from that.

… there are many ways …

In otherwords, you wanted to create a list of source files, yes?

This right here (my first post) does just that, creates a list of source files.

How and where the array comes from, well i’m afraid Lewis my friend, I’ll leave this one in your capable hands :stuck_out_tongue:

i don’t understand how is work this?? my sources is like that https://googledrive.com/host/0B_4b_1HlxqypYmlncHBEUE03aU0/[an1me.info]%20Gintama%20001.mp4

like this??

<?php echo $id = $_GET['episode1']; ?>

is not working (you understand i don’t know about php or javascript :slight_smile: )

The way the get variable works… in your address bar you put
http://www.mywebsite.com/index.php?variable=15

Note you will need a php file… you cannot use .html and from that the appended variable and its value can be called as:

$_GET[‘variable’]

So if you have the address as http://www.mywebsite.com/index.php?variable=14

[php]<?php
echo ‘’;
?>[/php]

That will output the same as putting:

[php]<?php
echo ‘’;
?>[/php]

If you have anymore questions - try running through these tutorials… learn the basics then come back to the code.

http://www.w3schools.com/html/
http://www.w3schools.com/php/

I know it would be easier if everyone had mad skilz like me as i am obviously the God Of Programming.

sorry again i don’t understand how to make to work…

i make a file all.php
with this:

 <video oncontextmenu="return false;" id="tvseason1" controls>
     <source id="epside1" src="https://googledrive.com/host/0B_4b_1HlxqypYmlncHBEUE03aU0/%5Ban1me.info%5D%20Gintama%20001.mp4" type="video/mp4">
     <source id="epside2" src="https://googledrive.com/host/0B_4b_1HlxqypYmlncHBEUE03aU0/%5Ban1me.info%5D%20Gintama%20002.mp4" type="video/mp4">
 Your browser does not support the video.
 </video>

and i have 2 files: post 1 and post 2

i need to make something like this?/
[php] <?php
echo ‘’;
?>[/php]for episode 1

and for episode two
[php] <?php
echo ‘’;
?>[/php]

I just created this for you… its basic but should do the job… after this you can look at SQL and retrieving from database, but should be simple enough. Put it in one file called index.php or something along those lines.

[php]

<?php $season = mysql_real_escape_string($_GET['season'] - 1); $episode = mysql_real_escape_string($_GET['episode'] - 1); $url = array( array( 'URL FOR VIDEO 1 SEASON 1', 'URL FOR VIDEO 2 SEASON 1', 'URL FOR VIDEO 3 SEASON 1' ), array( 'URL FOR VIDEO 1 SEASON 2', 'URL FOR VIDEO 2 SEASON 2', 'URL FOR VIDEO 3 SEASON 2' ) ); echo ' '; ?>

[/php]

or the patience of a saint 8)

Lol i spose, i just love being a God lol.

is not working (you are sure what i want??)

Show me the screenshot of the website… and it not working…

I’m beginning to think somebody is copying these code snippets literally without making the necessary changes to arrays or paths…

and i don’t want to put this in every post, all my sources will be in all.php

Do not put any other code in it… With a blank document shows that the code im giving works, AFTER that you can start putting your others in, if you wanted you could use the php function to include the document… but that screenshot doesnt show the address bar… Have you included the session and episode variables… send a screenshot … including your desktop… of a normal web browser… with the page loaded…

but how i get the episode 3 or 40??

In the address bar you have:

localhost/test/test.php

this needs to be:

localhost/test/test.php?season=1&episode=1

works but in post 1 or 2 or 400 the include or echo is not working

[php] <?php
include(“http://localhost/test/all.php?season=1&episode=2”);
?>

 <?php

echo ‘http://localhost/test/all.php?season=1&episode=2’;
?>[/php]

Just put this in all.php

[php]$url = array(
array(
‘URL FOR VIDEO 1 SEASON 1’,
‘URL FOR VIDEO 2 SEASON 1’,
‘URL FOR VIDEO 3 SEASON 1’
),
array(
‘URL FOR VIDEO 1 SEASON 2’,
‘URL FOR VIDEO 2 SEASON 2’,
‘URL FOR VIDEO 3 SEASON 2’
)
);[/php]

and put include(‘all.php’);

The rest you keep in that document…

i have this in all.php

[php]

<?php $season = mysql_real_escape_string($_GET['season'] - 1); $episode = mysql_real_escape_string($_GET['episode'] - 1); $url = array( array( 'https://googledrive.com/host/0B_4b_1HlxqypYmlncHBEUE03aU0/%5Bhttp:%2F%2Fan1me.info%5D%20Gintama%20001', 'https://googledrive.com/host/0B_4b_1HlxqypYmlncHBEUE03aU0/%5Bhttp:%2F%2Fan1me.info%5D%20Gintama%20002', 'https://googledrive.com/host/0B_4b_1HlxqypYmlncHBEUE03aU0/%5Bhttp:%2F%2Fan1me.info%5D%20Gintama%20003' ) ); echo ' '; ?>

[/php]
and in post i want to include only one from video like this

<?php include("http://localhost/test/all.php?season=1&episode=2"); ?>

Sponsor our Newsletter | Privacy Policy | Terms of Service