Ok i am making a site that generates youtube thumbnails and i am generating an image that displays 1 image with a playbutton image on top of it
here is the page that generates the image:
http://jnerocorp.com/playbutton.php?id=J7VjUYGpsWM
and that works fine
but this requires that I get the id in this code which if ?id= is not set then it redirects and sets it and then that link will work but i am getting a redirection error
the url is here:
http://jnerocorp.com/youtube.php
here is the code:
Code: <?php
if(isset($_GET['url'])) {
$original = $_GET['url'];
$youtubelink = $_GET['url'];
$youtubelink = str_replace("http://", "", "$youtubelink");
$youtubelink = str_replace("www.", "", "$youtubelink");
$get_id = explode("/", $youtubelink);
$get_id = explode("&", $get_id[1]);
$get_id = str_replace("watch?v=", "", "".$get_id[0]."");
$thumbnail_default = str_replace("%id%", "$get_id", "http://img.youtube.com/vi/%id%/default.jpg");
$thumbnail_1 = str_replace("%id%", "$get_id", "http://img.youtube.com/vi/%id%/1.jpg");
$thumbnail_2 = str_replace("%id%", "$get_id", "http://img.youtube.com/vi/%id%/2.jpg");
$thumbnail_3 = str_replace("%id%", "$get_id", "http://img.youtube.com/vi/%id%/3.jpg");
$image = str_replace("%id%", "$get_id", "http://img.youtube.com/vi/%id%/0.jpg");
if(!isset($_GET['id'])) {
header("Location: http://www.JneroCorp.com/youtube.php?url=$original&?id=$get_id");
}
}
?>
<html>
<head>
<title> Youtube Thumbnail grabber </title>
<style type="text/css">
div.thumbs
{
position:absolute;
left:5px;
top:20px;
}
div.video
{
position:absolute;
left:400px;
top: 150px;
}
div.bigimage
{
position:absolute;
left: 850px;
top: 150px;
border: 1px;
}
</style>
</head>
<body>
<center>
<h1> Youtube Thumbnail Grabber </h1>
</center>
<?php
if(!isset($_GET['url'])) {
?>
<center>
<form action="" method="GET">
URL: <input type="text" name="url" size="35">
<input type="submit" value="Get Thumbnail!">
</form>
</center>
<?php
} else {
echo "<div class='thumbs'>Youtube Video ID: <b> $get_id <b>
Thumbails::
Default:
<img src='$thumbnail_default'>
Thumbnail 1:
<img src='$thumbnail_1'>
Thumbnail 2:
<img src='$thumbnail_2'>
Thumbnail 3:
<img src='$thumbnail_3'>
";
if(isset($_GET['id'])) {
$id = $_GET['id'];
echo "PlayButton Thumb:
<img src='http://JneroCorp.com/playbutton.php?id=$id'></div> ";
}
?>
<div class='video'>
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/<?php echo $get_id; ?>&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/<?php echo $get_id; ?>&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>
</div>
<?php echo "<div class='bigimage'><img src='$image'></div>"; ?>
<?php
}
?>
</body>
</html>
Connecion issue
Hi,For some reason, I keep getting this error when trying to connect:Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on...Warning: mysql_select_db()
Using the $_GET variable to view certain records
Hello,First let me explain my problem, I have 2 pages the first page pull a list of Guide titles from a database for example if i had a guide called "Install windows" it would be pulled from
Spliting paragraph into sentences and attach in
Here is what I am trying to doexample: Para1[123.456.789!] 3 sentences Para2[abc?defghij.klmnop! etc] 3+ sentencesIt should split the paras into sentences based on delimiters (.?!), count
Mysql error message
help me find out what this error message means:"Duplicate entry '0' for key 'PRIMARY'"the sql for it is Code: INSERT INTO accounts (firstname, lastname, username, password, joined, email,
Quick Syntax Question
Hi folks,I'm getting the following error: "unexpected T_LNUMBER". I'm trying to build a dynamic table in PHP it was working great until I attempted to include a java reference in one of my
timed header image rotation
I have a joomla site and I was trying to setup a rotating image based on timing NOT just refreshing the page.I found this code (i didn't write it) which works to load images but does not switch them
Oracle Text CTX_DOC.snippet slow
I have a table (FILE_TABLE) that contains a blob column (ft_file) and I have created the following Oracle Text Index on that table/file column....
get url?
how do i get the url of the page i'm currently on, on my website.. i think its get header.. how do i do that?
send message to the java application
Oracle 10g with Windows platform.
Need to write a cookie with a url var
Not sure if its possible, but I need to write a cookie with a url.So this would write 2232 as the cookie for ID.http://www.example.com/redirect.php?ID=2232Ultimately, I'm working on a pixel tracking