I need a working piece of php and I can’t make it myself. As a hobbyist web designer, my skill set just isn’t there. All it’s supposed to do is push a YouTube video through a javascript video player. I know it’s a bit more complicated that that, but from my attempts to research it doesn’t appear to be an exceptionally long piece of code I’m looking for - maybe a few lines.
My video pages problems …
On the page; arisenfromnothing (dot) com (slash) a (slash) videos
You’ll find in the html code your standard webpage stuff
it’s not the most modern code, but it works on all browsers and looks pretty cool.
The central div on the page executes a youtube call out:
Then associates a script (via the videos2 div id). The script is listed below:
// Video Player
function requestAccess (client, access_key) {
naturalsyntheticaccess.embedAccessKey(client + access_key + (access?1:0), ‘client’, ‘key1’, ‘key2’, ‘key3’, false, false, {getAccess: ‘true’});
}
function loadVideo(playerUrl, autoplay) {
swfobject.embedSWF(
playerUrl + ‘&rel=1&border=0&fs=1&autoplay=’ +
(autoplay?1:0), ‘player’, ‘465’, ‘344’, ‘9.0.0’, false,
false, {allowfullscreen: ‘true’});
}
function showMyVideos2(data) {
var feed = data.feed;
var entries = feed.entry || [];
var html = [’
- ’];
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
var title = entry.title.$t.substr(0, 50);
var alt = entry.title.$t.substr(0, 500);
var postday = entry.published.$t.substr(8, 2);
var postmonth = entry.published.$t.substr(5, 2);
var postyear = entry.published.$t.substr(0, 4);
var content = entries[i].media$group.media$description.$t.substr(0, 500);
var thumbnailUrl = entries[i].media$group.media$thumbnail[0].url;
var playerUrl = entries[i].media$group.media$content[0].url;
var video = entries[i].media$group.media$thumbnail[0].url.substr(22, 11);
html.push(’
<a href=http://www.arisenfromnothing.com/video.php?watch=’, video, ’ rel=“lyteframe[video]” title="’, alt, ‘" rev=“width: 790px; height: 475px; scrolling: no;”> |
’, alt, ‘ Posted On: ‘,postmonth,’/’,postday,’/’,postyear,‘ Description: ’, content , ‘ Watch This Video On YouTube |
<a href=http://www.arisenfromnothing.com/video.php?watch=’, video, ’ rel=“lyteframe[video]” title=“Click Here To Play This Video” rev=“width: 790px; height: 475px; scrolling: no;”>![]() |
’);
}
html.push(’
document.getElementById(‘videos2’).innerHTML = html.join(’’);
if (entries.length > 0) {
loadVideo(entries[0].media$group.media$content[0].url, false);
}
}
This scripts reaches out to a PHP file,and that’s where the trouble is. I don’t have the PHP, and don’t know how to write it. Here is the HTML portion of the file minus the needed PHP:
Video Player <?php HELP ---------------------------------------------------------------------------------------------------------------------------------------- If someone would be willing to write these couple of lines for me, I would be more than a little grateful. This has been the bane of my existence since I've begun trying to repair this page. Thanks