Jump to content

BenRobertson

Members
  • Content Count

    15
  • Joined

  • Last visited

Community Reputation

2 Neutral

About BenRobertson

  • Rank
    Newbie
  1. Ok,Thanks for all of your help guys. Plan to focus on PHP when my 6 weeks of schools holidays start (5 days and counting). Also I will register a domain and rent a server when my parents are back from holiday.Thanks,Ben
  2. So does this mean that I would have to start renting a web server with modified permissions?
  3. Okay, so after a bit of delving into the code that is read by the browser I have discovered something that may be effecting the program. If I right click on the random audio files directory inside Google Chrome's "inspect element" interface and then press "open link in new tab" I am confronted with a page reading exactly this: Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server.If you think this is a server error, please contact the webmaster. Error 403 localhost Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 C
  4. Ok, so the PHP is working now but the play button on the audio is grayed out as you can see in this picture here: http://s1340.beta.ph...html?sort=3&o=0. The reason I can see that the PHP is being executed is if I right-click, then go "Inspect Element", then find the audio code and refresh the page you can see that the song title changes (but only in the code). Any ideas on how I can fix the issue involving the audio player being grayed out?
  5. Hey, No the file is only currently has an HTML extension as that was the first language I used. If I was to make it PHP would all of the html still run correctly?
  6. When I used Ctrl-Shift-I on Google Chrome it brought up a set of developer tools. This code here: <?php$files = glob('C:\xampp\htdocs\Audio\*.m4a');$random = array_rand($files, 2);$fname1 = $files[$random[0]];$fname2 = $files[$random[1]];?> Appeared as if it was a comment, like this: <!--?php$files = glob('C:\xampp\htdocs\Audio\*.m4a');$random = array_rand($files, 2);$fname1 = $files[$random[0]];$fname2 = $files[$random[1]];?--> I'm not sure why, would you mind explaining?
  7. It still won't work. I put the code to get a random filename above the code of the audio player and tried to no avail. I am beginning to think that the audio could be a sever related thing as all the files for the website are still stored on my pc, their just running through XAMPP in the browser. I have uploaded a screenshot of the issue here:http://s1340.beta.photobucket.com/user/RottenToads/media/tunesmashscreenschot.jpg.html?sort=3&o=0 and also the code again just to be doubly sure. Thanks <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DT
  8. Hi I set up a Local Host XAMPP server but the PHP code didn't work. Here is the code, would you mind pointing out any errors? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><title>tunesmash</title><style type+text/css>body {color : black;}a {text-decoration: none; color: white;}#motto {left:33%;position:absolute;top:6%;width:5s0%;}#header {left:5%;position:absolute;top:2%;width:50%;}#upload {left:23%;position:absolute;top:12%;width:50%;}#why {left:17%;position:absolute;top:12%;width:
  9. So... For the part in my code - <source src="RIEY.m4a" type="audio/mpeg">. Would I put $fname1 were RIEY.m4a is currently positioned? Also can PHP go in any part of the code or does it have to be in say... the body section?
  10. Hi again, PHP will only work once the site is actually on a web based server, correct? Also, how to I get the two audio players to select the music once the PHP script has picked the two random audio files? Thank you very much for your time.
  11. Hi justsomeguy, Sorry to keep bothering you but would you mind explaining the issue a little more simply as I am unfamiliar with PHP. The idea of the website is that the user can choose what song they like out of two side by side songs. I have all of the music in a local directory on my PC: C:\Users\Movie\Desktop\TuneSmash\Audio. I need some help so that the website picks a random song out of that folder and the user then has the ability to play it. Would you mind implementing your code into the code that is at the top of the page? Thanks for all the help!
  12. Hey Justsomeguy, Thanks for your quick reply, I am only 13 and have been learning web coding for around 2 months now. Me and a friend at school have decided to make a website focused on comparing two random, different songs with each other. I have the website looking nice, its just that I need the two side by side audio players to select a random song from a given folder, thus allowing the user to vote on which ever song he or she likes the most. I am not familiar with PHP yet and do not physically have a server set up or rented. Thanks in advance, Ben Robertson
×
×
  • Create New...