
kney
Members-
Posts
140 -
Joined
-
Last visited
Never
About kney
- Birthday 11/08/1987
Profile Information
-
Gender
Male
-
Location
Dessel, Belgium
kney's Achievements

Member (2/5)
0
Reputation
-
Youtube also has an HTML5 video player.. Does that still use the same format? http://www.youtube.com/html5
-
This is how you use the new HTML5 tag <video>. But I want to know how to stream youtube videos through this tag. <!DOCTYPE html> <html lang="nl"> <head><title>HTML5</title></head> <body> <video width="320" height="240" controls="controls"> <source src="movie.mp4" type="video/mp4" /> <source src="movie.ogg" type="video/ogg" /> Your browser does not support the video tag. </video> </body> </html> If you change the source to the youtube URL it doesn't work This doesn't work <!DOCTYPE html> <html lang="nl"> <head><title>HTML5</title></head> <body> <video width="320" height="240" controls="controls"> <source src="http://www.youtube.com/embed/-p3atsZRPLc" /> Your browser does not support the video tag. </video> </body> </html>
-
The code is indented on my host, but it didn't do the indentation when i copied it over. That pretty much solves the issue. Thanks mate! <?php include("includes/header.php"); function uploadPhoto($path, $title) { $apiKey = "******"; $apiSecret = "******"; $permissions = "write"; $token = "******"; $f = new phpFlickr($apiKey, $apiSecret, true); $f->setToken($token); return $f->async_upload($path, $title); } if($_SESSION['usernr'] != true){ ?> <section id="content" class="body"> <h1>Sorry!</h1> You are not authorized to view this page! </section> <?php }else{ //Include phpFlickr require_once("phpFlickr/phpFlickr.php"); $error=0; $f = null; if($_POST){ if(!$_POST['name'] || !$_FILES["file"]["name"]){ $error=1; }else{ if ($_FILES["file"]["error"] > 0){ echo "Error: " . $_FILES["file"]["error"] . "<br />"; }else if($_FILES["file"]["type"] != "image/jpg" && $_FILES["file"]["type"] != "image/jpeg" && $_FILES["file"]["type"] != "image/png" && $_FILES["file"]["type"] != "image/gif"){ $error = 3; }else if(intval($_FILES["file"]["size"]) > 525000){ $error = 4; }else{ $dir= dirname($_FILES["file"]["tmp_name"]); $newpath=$dir."/".$_FILES["file"]["name"]; rename($_FILES["file"]["tmp_name"],$newpath); //Instantiate phpFlickr $status = uploadPhoto($newpath, $_POST["name"]); if(!$status) { $error = 2; } } } } ?> <section id="content" class="body"> <div id="doc" class="yui-t7"> <div id="hd" role="banner"><h1>Foto Uploader</h1></div> <div id="bd" role="main"> <div id="mainbar" class="yui-b"> <?php if (isset($_POST['name']) && $error==0) { echo " <h2>Your file is uploaded to <a href='http://www.flickr.com/photos/78262663@N02/' target='_blank'>DK1885 his photos!</a></h2>"; }else { if($error == 1){ echo " <font color='red'>Please enter a file name.</font>"; }else if($error == 2) { echo " <font color='red'>Your photo can't be uploaded.</font>"; }else if($error == 3){ echo " <font color='red'>Please only upload JPG, JPEG, PNG or GIF files.</font>"; }else if($error == 4){ echo " <font color='red'>The file size is larger than 512Kb.</font>"; } ?> <h2>Upload your photos!</h2> <form method="post" accept-charset="utf-8" enctype='multipart/form-data'> <p>Name: <input type="text" name="name" value="" ></p> <p>Picture: <input type="file" name="file"/></p> <p><input type="submit" value="Submit"></p> </form> <?php } ?> </div> </div> <div id="ft"></div> </div> </section> <?php } include("includes/footer.php"); ?> It's weird that the indentation gets done correct now..
-
yea i think he did, and I used $status = uploadPhoto($newpath, $_POST["name"]); and function uploadPhoto($path, $title) { }
-
the uploadphoto() function is specified in this php file (7 lines below, from where I use it)
-
I get this error: Fatal error: Call to undefined function uploadphoto() in ....... on line 39 I use phpFlickr to upload my photos from my website to Flickr. Here's the code <?php include("includes/header.php"); if($_SESSION['usernr'] != true){ ?> <section id="content" class="body"> <h1>Sorry!</h1> You are not authorized to view this page! </section> <?php }else{ //Include phpFlickr require_once("phpFlickr/phpFlickr.php"); $error=0; $f = null; if($_POST){ if(!$_POST['name'] || !$_FILES["file"]["name"]){ $error=1; }else{ if ($_FILES["file"]["error"] > 0){ echo "Error: " . $_FILES["file"]["error"] . "<br />"; }else if($_FILES["file"]["type"] != "image/jpg" && $_FILES["file"]["type"] != "image/jpeg" && $_FILES["file"]["type"] != "image/png" && $_FILES["file"]["type"] != "image/gif"){ $error = 3; }else if(intval($_FILES["file"]["size"]) > 525000){ $error = 4; }else{ $dir= dirname($_FILES["file"]["tmp_name"]); $newpath=$dir."/".$_FILES["file"]["name"]; rename($_FILES["file"]["tmp_name"],$newpath); //Instantiate phpFlickr $status = uploadPhoto($newpath, $_POST["name"]); if(!$status) { $error = 2; } } } } function uploadPhoto($path, $title) { $apiKey = "*****************"; $apiSecret = "*****************"; $permissions = "write"; $token = "*****************"; $f = new phpFlickr($apiKey, $apiSecret, true); $f->setToken($token); return $f->async_upload($path, $title); } ?> <section id="content" class="body"> <div id="doc" class="yui-t7"> <div id="hd" role="banner"><h1>Foto Uploader</h1></div> <div id="bd" role="main"> <div id="mainbar" class="yui-b"> <?php if (isset($_POST['name']) && $error==0) { echo " <h2>Your file is uploaded to <a href='http://www.flickr.com/photos/78262663@N02/' target='_blank'>DK1885 his photos!</a></h2>"; }else { if($error == 1){ echo " <font color='red'>Please enter a file name.</font>"; }else if($error == 2) { echo " <font color='red'>Your photo can't be uploaded.</font>"; }else if($error == 3){ echo " <font color='red'>Please only upload JPG, JPEG, PNG or GIF files.</font>"; }else if($error == 4){ echo " <font color='red'>The file size is larger than 512Kb.</font>"; } ?> <h2>Upload your photos!</h2> <form method="post" accept-charset="utf-8" enctype='multipart/form-data'> <p>Name: <input type="text" name="name" value="" ></p> <p>Picture: <input type="file" name="file"/></p> <p><input type="submit" value="Submit"></p> </form> <?php } ?> </div> </div> <div id="ft"></div> </div> </section> <?php } include("includes/footer.php"); ?>
-
yeah I know, it gives something like this. With the bold being my URL. And it doesn't do it correctly
-
Hi, I'm going to have a website where I'm going to publish certain newsitems daily/weekly or whatever. This is the link http://onenation.freehostia.com/kenneth/nieuws.php If you click the title of the certain news item you get the whole article. Now, each of these articles should have a "like button" from Facebook. A bit like it is now, but if I click like in my first article, it likes the whole site instead of the 1 article. How can I seperate this?
-
<?php // Connect to your Database mysql_connect("your.hostaddress.com", "username", "password") or die(mysql_error()); mysql_select_db("Database_Name") or die(mysql_error()); $query = ("SELECT * FROM tablename"); $resultset = mysql_query($query); while($result = mysql_fetch_array($resultset)){ if ($result["columnname"] == "mytexthere"){ header("Location: index.php"); break; } } ?>
-
Shouldn't you use is_numeric? $category=mysql_real_escape_string($_GET['category']); if (is_numeric($category)) { Edit: What AyKay47 says
-
you didn't close table tag
-
<?php $test = ""; while($row = mysql_fetch_assoc($rs) { echo 'Order ID: ' . $row['order_id']; if($row['order_id'] == $test){ echo 'Total: ' . $row['total']; } $test = $row['order_id']; } ?>
-
how to destroy session automatically after defined time?
kney replied to rahulvicky00's topic in PHP Coding Help
<?php session_start(); // timeout after 10 minutes $inactive = 600; $session_life = time() - $_session['timeout']; if($session_life > $inactive) { session_destroy(); header("Location: logoutpage.php"); } S_session['timeout']=time(); ?> -
You only need to include the page where you have the image in all 47 files. And when it needs to be updated you change it only in the image.php file e.g. image.php <?php echo "<img src='image.jpg' width='125' height='156' />"; ?> e.g. index.php, blabla.php <?php // wherever the right column is include("image.php"); ?>
-
<?php echo "<form name='newmessage' method='post' action='send_message.php?goauld=". $_GET['goauld'] ."'>"; ?>