PHP - Comment 10 Second Minimum Wait Time Between Posts Spam Protection Help
I have a comment section that is secure against everything except spam..
Is there anyway to do like a 10second minimum wait time between posts? Similar Tutorialsim having some robots injecting gibberish i wnat to deny amy links in the requesttext of the form for some reason i tested it and it accepted a http link Code: [Select] if (preg_match("/http/i","$RequestText")){ exit();} thanks Hey, Wondering if this would work, it is based on the idea that everyone who is a real visitor will be using a browser, is that correct? Do robots use browsers too? if so, it wont work! haha. <? $browser = mb_substr($_SERVER['HTTP_USER_AGENT'], 0, 31); if (!empty($browser)){echo '<form action="send.php" method="post">';} ?> Just thought it was nice and simple, and couldnt see anywhere if it would work or not... <?php include ("database.php"); // show comments $result = mysql_query("SELECT * FROM gamecomments"); while($row = mysql_fetch_array($result)) { echo $row['username'] . ": <Br> " . $row['comment']; echo "<p>"; } ini_set ("display_errors", "1"); error_reporting(E_ALL); if (isset($_POST['submit'])) { // now we insert it into the database $insert = "INSERT INTO gamecomments (username, comment) VALUES ('[$username]', '$_POST[comment]')"; $add_comment = mysql_query($insert); { echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=games.php\">"; } } '[$username]' is using a variable from a cookie varifying that you are logged in, this code works except i need to put real escape strings and protection from mysql injection and dont really know where to put them. Code: [Select] if (isset($_POST['submit'])) { // now we insert it into the database $insert = "INSERT INTO gamecomments (username, comment) VALUES ('[$username]', '$_POST[comment]')"; $add_comment = mysql_query($insert); { echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=games.php\">"; } } [CODE] Ok, so I want to make a comment spam filter for my site. I know the basic logic, but have yet to figure out how to write the functions. I have a database table called comments that has a column called "time", which contains a unix timestamp value of when it was posted. Basically what I want to do is this: When a user tries to post a comment, the script determines with a database query if they have posted a comment in the last 120 seconds. So basically I have to find the current time, and the time it was 120 seconds before the current time. Then I have to find any comments posted by the user that were made after the 120 second mark. My database query should then look something like this, right? Code: [Select] $query = mysql_query("SELECT * FROM comments WHERE author = ".$_SESSION['id']." AND time > '".$120secondsago"'"); Please correct me if my logic is wrong, which it very well may be, but how would I find the unix timestamp code from 120 seconds before the current time? Note that 120 seconds is just an example and also that I have not worked with dates in mysql very often. $query = mysql_query("SELECT * FROM comments WHERE author = ".$_SESSION['id']." AND time as far as everything goes, i have it working but not quite perfect yet... you may assume already what im trying to do, and yes im making a comment box option for each news posting I have. I have it working up to the point of showing comment posts and posting them. But my issue is, anytime i submit a comment for one news post, it will repeat the post for how many news postings i have and will place them in each news posting. so i need some help to prevent this lol. here's my code Code: [Select] <?php //News Code Here $dbtn = 'news'; $result = mysql_query("SELECT * FROM $dbtn ORDER by id DESC LIMIT 10") or die("query failed: " . msql_error()); while ($row = mysql_fetch_array($result)) { list($id, $header, $date, $news, $edate) = $row; $news = nl2br($news); $date = date("M j, Y",strtotime("$date")); echo '<table width="680" border="0" cellpadding="14" cellspacing="0">'; echo '<tr>'; echo '<td class="newspost">'; echo '<font size="+2"><b>'.$header.'</b></font><font size="-1" color="#CCCCCC"> - '.$date.'</font><br />'; echo '<hr color="#FFFFFF" width="100" align="left" size="1">'; echo ' - '.$news.$edate; echo '</td>'; echo '</tr>'; echo '<tr>'; echo '<td>'; $comres = mysql_query("SELECT * FROM comment WHERE menu_title='$dbtn' AND post_id='$id' ORDER by date DESC") or die("query failed: " . msql_error()); while($rows = mysql_fetch_array($comres)){ list($comid, $menu_title, $post_id, $comdate, $comname, $comment) = $rows; $comment = nl2br($comment); $comdate = date("M j, Y",strtotime("$comdate")); echo 'User: '.$comname.'<br />'; echo ' - '.$comment; echo '<div align="right"><font color="grey">'.$comdate.'</font></div>'; } echo '<a class="show_hide" rel="#slidingDiv_'.$id.'">Comment</a>'; echo '<div id="slidingDiv_'.$id.'" class="toggleDiv" style="display: none;">'; if(isset($_POST["add"])){ $name = $_POST["comname"]; $comment = $_POST["comment"]; $querys = "INSERT INTO comment (menu_title, post_id, date, name, comment) VALUES ('$dbtn', '$id', CURDATE(), '$name', '$comment')"; mysql_query($querys) or die("Error, insert query failed: ".mysql_error()); echo '<br /><br />Thank You!'; } else { echo '<form method="post">'; echo '<table width="100%" border="0" cellspacing="1" cellpadding="2">'; echo '<tr>'; echo '<td align="left" valign="top">Name</td>'; echo '<td align="left" valign="top">Comment</td>'; echo '</tr>'; echo '<tr>'; echo '<td align="left" valign="top"><input name="comname" size="25" type="text" id="comname"></td>'; echo '<td align="left" valign="top"><textarea name="comment" id="comment" cols="40" rows="4"></textarea></td>'; echo '</tr>'; echo '<tr>'; echo '<td> </td>'; echo '<td> </td>'; echo '</tr>'; echo '<tr>'; echo '<td> </td>'; echo '<td align="right" valign="top"><input name="add" type="submit" id="add" value="Submit"></td>'; echo '</tr>'; echo '</table>'; echo '</form>'; echo '</div>'; } echo '</td>'; echo '</tr>'; echo '</table>'; } ?> I added a css bubble thing around my comment and if it reaches i think 36 characteres with no spacing it breaks out of the buble and keeps going in a straight line. if i type over 35 words it will auto breakline and stay inside the bubble but i need fix this and i have no idea how. http://www.mysite.giacjr.dino-hosting.net/index.php take a look, it will explain itself alot better than i just did. CREATE TABLE posts ( postId INT(11) NOT NULL UNIQUE AUTO_INCREMENT, title VARCHAR(255) NOT NULL, author VARCHAR(24) NOT NULL, description TEXT NOT NULL, createdAt TIMESTAMP, PRIMARY KEY (postId) ); CREATE TABLE comments( commentId INT(11) NOT NULL UNIQUE AUTO_INCREMENT, comment TEXT NOT NULL, postId INT(11), userId INT(11), createdAt TIMESTAMP, PRIMARY KEY (commentId), FOREIGN KEY (userId) REFERENCES users(userId), FOREIGN KEY (postId) REFERENCES posts(postId) ); CREATE TABLE replies ( repId INT(11) NOT NULL UNIQUE AUTO_INCREMENT, reply TEXT NOT NULL, userId INT(11), commentId INT(11), createdAt TIMESTAMP, PRIMARY KEY (repId), FOREIGN KEY (userId) REFERENCES users(userId), FOREIGN KEY (commentId) REFERENCES comments(commentId) ); CREATE TABLE users ( userId INT(11) NOT NULL UNIQUE AUTO_INCREMENT, userName VARCHAR(100) NOT NULL,, email VARCHAR(100) NOT NULL, PRIMARY KEY (userId) ); how to retrive userName,comment, and createdAt from users and comments table while I have used userId as a Foreign key on the comment table if it isn't correct, correct me please This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=322815.0 Here's the scenario.... A Customer clicks on a product on the product page, this will open up the page for the individual product. In this example, it's a shirt. The shirt is available in many sizes and colors. The Minimum QTY for this product is : 12 . The customer can select as many sizes and colors as they want, as long they select a total of 12 (all sizes + all colors = total). After making their selections for this shirt, there is an "Add to Cart" button. I would like to run a check to make sure that the total is equal to or greater than the minimum QTY. Here is the form : Code: [Select] <?php session_start(); require("db.php"); require("functions.php"); $validid = pf_validate_number($_GET['id'], "redirect", $config_basedir); $prodsql = "SELECT * FROM products WHERE id = " . $_GET['id'] . ";"; $prodres = mysql_query($prodsql); $numrows = mysql_num_rows($prodres); $prodrow = mysql_fetch_assoc($prodres); $prodcatsql = "SELECT * FROM categories WHERE id = " . $_GET['id'] . ";"; $prodcatres = mysql_query($prodcatsql); $bulkcat = mysql_num_rows($prodcatres); if($numrows == 0) { header("Location: " . $config_basedir); } else { if($_POST['submit']) { if(!$_SESSION['SESS_ORDERNUM']) { if($_SESSION['SESS_LOGGEDIN']) { $sql = "INSERT INTO orders(customer_id, registered, date) VALUES(" . $_SESSION['SESS_USERID'] . ", 1, NOW())"; mysql_query($sql); session_register("SESS_ORDERNUM"); $_SESSION['SESS_ORDERNUM'] = mysql_insert_id(); } else { $sql = "INSERT INTO orders(registered, date, session) VALUES(0, NOW(), '" . session_id() . "')"; mysql_query($sql); session_register("SESS_ORDERNUM"); $_SESSION['SESS_ORDERNUM'] = mysql_insert_id(); } } foreach ($_POST as $name => $value) { if (substr($name, 0, 4) == 'qty_' && $value != '' && is_numeric($value)) { $arrOptions = explode('_', $name); $sizeid = $arrOptions[1]; $colorid = $arrOptions[2]; $quantity = $value; $itemsql = "INSERT INTO orderitems(order_id, product_id, size_id, color_id, quantity) VALUES (" . $_SESSION['SESS_ORDERNUM'] . ", " . $_GET['id'] . ", " . $sizeid . ", " . $colorid . ", " . $quantity . ")"; mysql_query($itemsql); } } $totalprice = $prodrow['price'] * $_POST['amountBox'] ; $updsql = "UPDATE orders SET total = total + " . $totalprice . " WHERE id = " . $_SESSION['SESS_ORDERNUM'] . ";"; mysql_query($updres); header("Location: " . $config_basedir . "showcart.php"); } else { require("header.php"); echo "<div id='adminhome'>"; echo "<form action='addtobasket.php?id=" . $_GET['id'] . "' method='POST'>"; echo "<table cellpadding='10' border='0'>"; echo "<tr>"; if(empty($prodrow['image2'])) { echo "<td width='205'><img src='store-images/no-image-large.jpg' width='200' alt='" . $prodrow['name'] . "'>"; } else { echo "<td width='205'> <img src='store-images/" . $prodrow['image2'] . "' width='200' alt='" . $prodrow['name'] . "'>"; } echo "</td>"; echo "<td>"; echo "<h1>";echo $prodrow['name'];echo "</h1>"; echo "<h2>";echo $prodrow['description'];echo "</h2>"; //echo "<pre>" . wordwrap( $prodrow['description'] , 30 ) . "</pre>"; echo "<p>";echo $prodrow['details'];echo "</p>"; echo "<br>"; if($bulkcat==0) { echo "<div id='bulk1'>"; echo "<table cellpadding='2' border='0'>"; echo "<tr>"; echo "<td>Quantity</td>"; echo "<td>12</td>"; echo "<td>24+</td>"; echo "<td>48+</td>"; echo "</tr>"; echo "<tr>"; echo "<td>Price</td>"; echo "<td>$" . money_format('%i', $prodrow['price']) . "</td>"; echo "<td>$" . money_format('%i', $prodrow['price2']) . "</td>"; echo "<td>$" . money_format('%i', $prodrow['price3']) . "</td>"; echo "</tr>"; echo "</table>"; echo "</div>"; echo "<div id='bulk2'>"; echo "<table cellpadding='2' border='0'>"; echo "<tr>"; echo "<br><div align='center'><strong>For Sizes 2XL - 5XL</strong></div>"; echo "</tr>"; echo "<tr>"; echo "<td>Quantity</td>"; echo "<td>12</td>"; echo "<td>24+</td>"; echo "<td>48+</td>"; echo "</tr>"; echo "<tr>"; echo "<td>Price</td>"; echo "<td>$" . money_format('%i', $prodrow['price4']) . "</td>"; echo "<td>$" . money_format('%i', $prodrow['price5']) . "</td>"; echo "<td>$" . money_format('%i', $prodrow['price6']) . "</td>"; echo "</tr>"; echo "</table>"; echo "</div>"; } else { echo "<div id='bulk1'>"; echo "<table cellpadding='2' border='0'>"; echo "<tr>"; echo "<td>Quantity</td>"; echo "<td>12</td>"; echo "<td>24+</td>"; echo "<td>48+</td>"; echo "</tr>"; echo "<tr>"; echo "<td>Price</td>"; echo "<td>$" . money_format('%i', $prodrow['price']) . "</td>"; echo "<td>$" . money_format('%i', $prodrow['price2']) . "</td>"; echo "<td>$" . money_format('%i', $prodrow['price3']) . "</td>"; echo "</tr>"; echo "</table>"; echo "</div>"; } echo "</td>"; echo "</tr>"; echo "</table>"; echo '<div id="basketmatrix">'; echo '<table cellpadding="1" border="1">'; echo '<tr>'; echo '<td></td>'; $arrsizes = array(); $i = 0; $result = mysql_query("SELECT DISTINCT s.id, s.size FROM sizes s INNER JOIN productoptions p ON s.id = p.sizeid WHERE p.productid = '" . $_GET['id'] . "' ORDER BY s.id"); while ($row = mysql_fetch_assoc($result)) { echo '<td class="heading">' . $row['size'] . '</td>'; $arrsizes[$i] = $row['id']; $i++; } echo '</tr>'; $i = 0; $result = mysql_query("SELECT DISTINCT c.id, c.color FROM colors c INNER JOIN productoptions p ON c.id = p.colorid WHERE p.productid = '" . $_GET['id'] . "' ORDER BY c.id"); while ($row = mysql_fetch_assoc($result)) { echo '<tr>'; echo '<td class="heading">' . $row['color'] . '</td>'; foreach ($arrsizes as $sizevalue) { echo '<td><input type="text" name="qty_' . $sizevalue . '_' . $row['id'] . '" size="5" /></td>'; } echo '</tr>'; } echo '</table>'; echo '</div>'; echo "<br>"; echo "<br>"; echo '<table>'; echo '<tr>'; echo '<td>'; echo '<p>You MUST order a total of <font color="#ff0000"><strong>(' . $prodrow['minimum'] . ')</strong></font> or more to add this item to your cart.<br>'; echo '(all colors + all sizes = total)</p>'; echo '</td>'; echo '<tr>'; echo '<td>'; echo"<input type='submit' name='submit' value='Add To Cart'>"; echo '</td>'; echo '</tr>'; echo '</table>'; echo "</form>"; echo "</div>"; } } require("footer.php"); ?> Hi i need a bit of help. i have toner database which stores, the type, brand, colour, min, max stock. I just want to know if there is anyway of notifying the user when the toner reachs the min level, maybe highligh the row in red or something similar. many thanks. is there a way to excute the system() command here but not wait for it and just let it go in the background? And something that wont boggle down the system too much? Thanks! Code: [Select] $this->db->insert('jukebox', $data); echo '1'; system('ffmpeg -i ' . $id . '.mp3 -acodec libvorbis -aq 60 ' . $id . '.ogg'); ok here is my code: it has a counter variable $i at the start which basically acts as a maximum cutoff for how much data can be output. i have this variable set at 5. how can i make it so that it doesnt cut off the results (outputs the full 7 days worth of results if available), but ALWAYS outputs a minimum of 5 results? $now = $now-(7*24*60*60); // Display 7 Days of Results $query = mysql_query("SELECT * FROM table WHERE date >= '$now' ORDER BY max(date) desc"); $i = 0; while ($row = mysql_fetch_assoc($query)) { $cid = $row['cat_id']; $title = $row['name']; $seoname = cleanurl($title,0); $img = 'images/'.$seoname.'.jpg'; if (!file_exists($img)) { $img = ''; } else { $img = 'images/'.$seoname.'.jpg'; } if (!empty($img)) { $i++; } if (!empty($img) && $i <= 5) { // Always show ATLEAST 5 results echo '<img src="'.$img .'" style="width:528px;" alt="" />' . "\n"; } } Please help and look at my code..thanks. I'm working on a little shopping cart and my issue is this.... Some of the products available have a minimum quantity that must be reached before they can add it to the cart. I have a field in the products table called "minimum". When the admin adds a new product, he inputs the minimum required to order the item. I need help figuring out how to write the code that checks to make sure the quantity entered meets the minimum quantity set in the products table. My code is below: Code: [Select] <?php session_start(); require("db.php"); require("functions.php"); $validid = pf_validate_number($_GET['id'], "redirect", $config_basedir); $prodsql = "SELECT * FROM products WHERE id = " . $_GET['id'] . ";"; $prodres = mysql_query($prodsql); $numrows = mysql_num_rows($prodres); $prodrow = mysql_fetch_assoc($prodres); $prodcatsql = "SELECT * FROM categories WHERE id = " . $_GET['id'] . ";"; $prodcatres = mysql_query($prodcatsql); $bulkcat = mysql_num_rows($prodcatres); if($numrows == 0) { header("Location: " . $config_basedir); } else { if($_POST['submit']) { if(!$_SESSION['SESS_ORDERNUM']) { if($_SESSION['SESS_LOGGEDIN']) { $sql = "INSERT INTO orders(customer_id, registered, date) VALUES(" . $_SESSION['SESS_USERID'] . ", 1, NOW())"; mysql_query($sql); session_register("SESS_ORDERNUM"); $_SESSION['SESS_ORDERNUM'] = mysql_insert_id(); } else { $sql = "INSERT INTO orders(registered, date, session) VALUES(0, NOW(), '" . session_id() . "')"; mysql_query($sql); session_register("SESS_ORDERNUM"); $_SESSION['SESS_ORDERNUM'] = mysql_insert_id(); } } foreach ($_POST as $name => $value) { if (substr($name, 0, 4) == 'qty_' && $value != '' && is_numeric($value)) { $arrOptions = explode('_', $name); $sizeid = $arrOptions[1]; $colorid = $arrOptions[2]; $quantity = $value; $itemsql = "INSERT INTO orderitems(order_id, product_id, size_id, color_id, quantity) VALUES (" . $_SESSION['SESS_ORDERNUM'] . ", " . $_GET['id'] . ", " . $sizeid . ", " . $colorid . ", " . $quantity . ")"; mysql_query($itemsql); } } $totalprice = $prodrow['price'] * $_POST['amountBox'] ; $updsql = "UPDATE orders SET total = total + " . $totalprice . " WHERE id = " . $_SESSION['SESS_ORDERNUM'] . ";"; mysql_query($updres); header("Location: " . $config_basedir . "showcart.php"); } else { require("header.php"); echo "<div id='adminhome'>"; echo "<form action='addtobasket.php?id=" . $_GET['id'] . "' method='POST'>"; echo "<table cellpadding='10' border='0'>"; echo "<tr>"; if(empty($prodrow['image'])) { echo "<td width='205'><img src='store-images/no-image-large.jpg' width='200' alt='" . $prodrow['name'] . "'>"; } else { echo "<td width='205'> <img src='store-images/" . $prodrow['image'] . "' width='200' alt='" . $prodrow['name'] . "'>"; } echo "</td>"; echo "<td>"; echo "<h1>";echo $prodrow['name'];echo "</h1>"; echo "<h2>";echo $prodrow['description'];echo "</h2>"; //echo "<pre>" . wordwrap( $prodrow['description'] , 30 ) . "</pre>"; echo "<p>";echo $prodrow['details'];echo "</p>"; echo "<br>"; if($bulkcat==0) { echo "<div id='bulk1'>"; echo "<table cellpadding='2' border='0'>"; echo "<tr>"; echo "<td>Quantity</td>"; echo "<td>12</td>"; echo "<td>24+</td>"; echo "<td>48+</td>"; echo "</tr>"; echo "<tr>"; echo "<td>Price</td>"; echo "<td>$" . money_format('%i', $prodrow['price']) . "</td>"; echo "<td>$" . money_format('%i', $prodrow['price2']) . "</td>"; echo "<td>$" . money_format('%i', $prodrow['price3']) . "</td>"; echo "</tr>"; echo "</table>"; echo "</div>"; echo "<div id='bulk2'>"; echo "<table cellpadding='2' border='0'>"; echo "<tr>"; echo "<br><div align='center'><strong>For Sizes 2XL - 5XL</strong></div>"; echo "</tr>"; echo "<tr>"; echo "<td>Quantity</td>"; echo "<td>12</td>"; echo "<td>24+</td>"; echo "<td>48+</td>"; echo "</tr>"; echo "<tr>"; echo "<td>Price</td>"; echo "<td>$" . money_format('%i', $prodrow['price4']) . "</td>"; echo "<td>$" . money_format('%i', $prodrow['price5']) . "</td>"; echo "<td>$" . money_format('%i', $prodrow['price6']) . "</td>"; echo "</tr>"; echo "</table>"; echo "</div>"; } else { echo "<div id='bulk1'>"; echo "<table cellpadding='2' border='0'>"; echo "<tr>"; echo "<td>Quantity</td>"; echo "<td>12</td>"; echo "<td>24+</td>"; echo "<td>48+</td>"; echo "</tr>"; echo "<tr>"; echo "<td>Price</td>"; echo "<td>$" . money_format('%i', $prodrow['price']) . "</td>"; echo "<td>$" . money_format('%i', $prodrow['price2']) . "</td>"; echo "<td>$" . money_format('%i', $prodrow['price3']) . "</td>"; echo "</tr>"; echo "</table>"; echo "</div>"; } echo "</td>"; echo "</tr>"; echo "</table>"; echo '<div id="basketmatrix">'; echo '<table cellpadding="1" border="1">'; echo '<tr>'; echo '<td></td>'; $arrsizes = array(); $i = 0; $result = mysql_query("SELECT DISTINCT s.id, s.size FROM sizes s INNER JOIN productoptions p ON s.id = p.sizeid WHERE p.productid = '" . $_GET['id'] . "' ORDER BY s.id"); while ($row = mysql_fetch_assoc($result)) { echo '<td class="heading">' . $row['size'] . '</td>'; $arrsizes[$i] = $row['id']; $i++; } echo '</tr>'; $i = 0; $result = mysql_query("SELECT DISTINCT c.id, c.color FROM colors c INNER JOIN productoptions p ON c.id = p.colorid WHERE p.productid = '" . $_GET['id'] . "' ORDER BY c.id"); while ($row = mysql_fetch_assoc($result)) { echo '<tr>'; echo '<td class="heading">' . $row['color'] . '</td>'; foreach ($arrsizes as $sizevalue) { echo '<td><input type="text" name="qty_' . $sizevalue . '_' . $row['id'] . '" size="5" /></td>'; } echo '</tr>'; } echo '</table>'; echo '</div>'; echo "<br>"; echo "<br>"; echo '<table>'; echo '<tr>'; echo '<td>'; echo '<p>You MUST order a total of <font color="#ff0000"><strong>(' . $prodrow['minimum'] . ')</strong></font> or more to add this item to your cart.<br>'; echo '(all colors + all sizes = total)</p>'; echo '</td>'; echo '<tr>'; echo '<td>'; echo"<input type='submit' name='submit' value='Add To Cart'>"; echo '</td>'; echo '</tr>'; echo '</table>'; echo "</form>"; echo "</div>"; } } require("footer.php"); ?> I need help this problem seem too tricky for me right now. I got an array with decimal numbers and behind it says Yes/No. The min() function works magically and still is able to correctly give me the lowest value. But how do i make a while loop that loops until it pops a value that is lowest and has Yes behind it? For example: Array => ('11,64|No', '209,81|Yes', '533,42|Yes', '27,90|No', '93,01|Yes') So this function should return '93,01|Yes' i want make php script using minimum spanning tree algorithm, the start node is define from user input, and the end nodes are from database table. the distance is calculated between Start node (koord_x, koord_y) and end nodes (koord_x2, koord_y2). The output are the minimun distance, name start node and end node include distance between them. please help me, i'm working on my thesis... Hi Guys I am adding a short contact form to a site. All the fields are text fields. What do you think is the minimum validation I need to add to make the form safe against hacking etc. Thanks how would this code work? Code: [Select] if ($_POST['username'] == "[, ., ,, _, -" ){ die('Invalid characters.'); i want it to mean if there are any characters like ", [ . - _ ' " or anything in the username then die('invalid characters.'); for extra safety I have been getting a lot more client requests to protect files. What is the easiest way to do this. So, basically I have tried doing it outside the public directory. There are too many things that cause issues with this. I haven't been able to get a successfull implementation of this since I started working with this. So I was thinking instead about password protecting a directory that is inside public view, but still get files via PHP. Is there a way to setup a password protected directory, then retreive stuff from that directory using PHP. Or, a good way to put them outside the public folder. Everything I have tried to do to get a file to save outside of public view, has not worked. It always says uploaded but the file is never there. Also, I have verified correct permission for this as well. |