I am trying to set up a "Recent Uploads" script for the images that get uploaded to my site, but keep hitting a snag. Is it possible to have the image path just point at the folder where the images get uploaded to, instead of specifying an image to use?
Sorry if this isn't making sense...it's way beyond my knowledge level! An example of what I am looking to do can be found at tinypic [dot] com. They have the "Recent Videos" script that refreshes with the most recent uploads.
If needed, here is the code for my site so far.
CODE
<?
include "config.php";
?>
<html>
<head>
<title>XS GfX - Image Hosting for XS</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel='shortcut icon' href='favicon.ico'>
<style type="text/css">
<!--
.style2 {
font-size: x-small;
color: #666666;
}
.style3 {color: #FFFFFF}
.style4 {color: #E1E0D8}
.style10 {
font-size: 10px;
color: #000000;
}
-->
</style>
</head>
<center>
<body bgcolor='#272f80' background='background.gif'>
<br>
<table align='center' border='0' cellpadding='2' cellspacing='2' width='740' bgcolor='222222'>
<tr><td>
<link rel="stylesheet" href="style.css" type="text/css">
<img src="logo_up.png" height="125" width="740" border="0" alt=" ">
<center>
<br>
<br>
<br><br><br>
<?php
$logfile= '/var/www/html/Log.txt';
$IP = $_SERVER['REMOTE_ADDR'];
$logdetails= date("F j, Y, g:i a") . ': ' . '<a href=http://dnsstuff.com/tools/city.ch?ip='.$_SERVER['REMOTE_ADDR'].'>'.$_SERVER['REMOTE_ADDR'].'</a>';
$fp = fopen($logfile, "a");
fwrite($fp, $logdetails);
fwrite($fp, "<br>");
fclose($fp);
?>
<?
$divd = 1025;
$isize = $max_size / $divd;
$isize2 = round($isize);
?>
<span class="style3">Select an image to upload<br>
Max file size is set at</span> <?echo $isize2;?> <span class="style4">KB</span><br>
<br>
<form method="post" enctype="multipart/form-data" action="basic.php">
<INPUT TYPE="file" NAME="userfile" size="27">
<br><br><br>
<input type="submit" value="Upload" name="upload">
</form>
<p class="style10">Vulgar or Explicit content is not allowed!</p>
</td></tr>
<tr>
<td><p> <a href="http://www.xtreme-source.com"><img src="xs.gif" alt="XS" width="88" height="31" border="0"></a> <img src="greybar.gif" alt="Grey" width="560" height="33"><a href="http://www.xtreme-source.com/tutorials-adobe-photoshop/"><img src="gfxtutorials.gif" alt="GfX Tuts" width="88" height="31" border="0"></a></p></td>
</tr>
</table>
<?
//chooses a random number
$num = Rand (0,11);
//starts the random quote switch loop
switch ($num)
{
case 0:
echo "No soup for you!";
break;
case 1:
echo "Human Contact is overrated...";
break;
case 2:
echo "If you can't laugh at yourself, make fun of other people!";
break;
case 3:
echo "Confucius says BFD!";
break;
case 4:
echo "
It takes 46 muscles to frown but only 4 to flip 'em the bird. ";
break;
case 5:
echo "Behind every successful man is a surprised woman.";
break;
case 6:
echo "A bartender is just a pharmacist with a limited inventory.";
break;
case 7:
echo "Assassins do it from behind.";
break;
case 8:
echo "Beauty is in the eye of the beer holder.";
break;
case 9:
echo "C program run. C program crash. C programmer quit.";
break;
case 10:
echo "Double your drive space. Delete Windows!";
break;
case 11:
echo "Error, no keyboard. Press F1 to continue.";
break;
}
?>
Appreciate any help!!
This post has been edited by Jamaal10: 10 Jul, 2007 - 11:48 AM