Jump to content

SharkBait

Members
  • Posts

    845
  • Joined

  • Last visited

    Never

Everything posted by SharkBait

  1. What about a border around them? Do you get more money per impression than on a click? Or do clicks still pay more....?  I haven't seen many ads with google or any other company that would interest me but I will keep an eye out for them to help out.
  2. I'm curious, why 10GB upload limit?  Does your webhost allow for such a high usage of bandwidth too? Also if you're on a connection like OC48, uploading a file even remotely that large will take a really long time ;) Crazy :)
  3. Have you asked this on the IPB forums if this is what you're referring too?
  4. Ah I figured it out. IE is dumb.. dumb dumb dumb.  ;) When you use the enter key to submit a form, IE does not set the variable for the <input type="submit"> because it was not clicked.  Firefox and the rest are able to figure out when you hit the enter key, that you're submitting the form. So in my script I checked [code=php:0]if (isset($_POST['submit']) || isset($_POST['textboxinput']))[/code] and it seems to work fine. Though the Enter key on the numpad is different than the enter (return) key on the rest of the keyboard.. but thats another job to figure out
  5. In IE my form works but when you try and hit enter, it submits the information as if nothing was sent. In Firefox when you hit the enter key after filling out the form it works fine. What is it that IE does and Firefox doesnt?  Or is it the other way around? This is the code: [code] <div class="navcontainer"> Search <div class="navsub"> <table style="font-size: 65%; margin:0;" border="0" cellpadding="2" cellspacing="0"> <form action="search.php" method="post"> <tr> <td colspan="2" align="center"> <select name="table"> <option value="All">All Models</option> <?php asort($UNITS); foreach($UNITS as $unit) { $table = key($UNITS); echo "<option value=\"{$table}\""; if (isset($_SESSION['searchMOD'])) { if (($_SESSION['searchMOD'] == $table) || (isset($_POST['table']) && $_POST['table'] == $table)){ echo " selected=\"selected\" "; } } echo ">{$unit}</option>\n"; next($UNITS); } ?> </select><br /> </td> </tr><tr> <td colspan="2"> <p> <select name="type"> <option value="mac">MAC</option> <option value="sn">SN</option> <option value="rma">RMA</option </select> </p> </td> </tr><tr> <td colspan="2" align="center"> <input type="text" name="search" size="15" maxlength="20" accesskey="/" title="Alt /" value="<?php if(isset($_POST['search'])) echo $_POST['search']; ?>" /> </td> </tr><tr style="padding:0; margin:0;"> <td colspan="2" align="center"> <input type="submit" name="submit" value="Search" accesskey="." title="alt ."/> </td> </tr> </form> </table> </div> </div> [/code] I am unsure why in IE you can not just hit the 'enter' key to submit the form.....or why it doesnt handle it properly
  6. That makes sense. I think because I am grouping it by RMANumber it won't see the individual items, so I'll have to do another query after this one and then use your above code to tally the items up. Thanks
  7. Maybe I explained it wrong or I'm a bit confused. an RMA entry might look like this Line #    |    Unit      |RMANumber    | Notes ---------------------------------------------- 1            | Widget1  | 9090999        | Blah ---------------------------------------------- 2            | Widget2  | 9090999        | Mroe Blah ---------------------------------------------- 3            | Widget1  | 9090999        | WOo Blah ---------------------------------------------- So in the RMA above it has 2x Widget1s and 1x Widget2s My main query looks like this: [code] SELECT *, COUNT(*) FROM RMAs WHERE Received >= '{$MyDate}' AND Received != '0000-00-00 00:00:00' GROUP BY RMANumber [/code] Where MyDate is a user inputed date like 2006-06-01 00:00:01 Then I loop through the result to print out entries and group them by their RMANumbers and output them to the screen. At the same time I need a running total of how many Units of each time this loops sees.
  8. I'd have to do a seperate query. Right now my query is this: [code] SELECT * , COUNT(*) FROM RMAs GROUP BY RMANumber [/code] There can be multiple items for a single RMANumber. Can I somehow incorporate the SUM in to my SELECT?
  9. I am trying to count up how many instances something happens. I have an query that pulls values from a table.  The values are Items and Qty.  What I'm trying to do is create an array of the Items and their total quantities. [code] <?php $UNITS = array(); $UNITS[$result['Item']] .= $result['Qty']; ?> [/code] Now this just adds the number to the number that already exists in the array. How do I add the values of waht is in the array to the new value and put it back into the array? List is something like: Widget1  - 14 Widget2  - 3 Widget2 - 5 Widget3 - 2 Widget1 - 6 So I would have: 20 Widget1s 8 Widget2s 2 Widget3
  10. I'm stuck, and not sure how I go about doing it. Currently I am using a 2 column layout with floating div tags. The right div is 150px and the right tag is 650px. The issue I have is that if the left column is longer than the right column, then the right column does not expand all the way down to the bottom of the page and since my background colour is different than the colour of the right div tag, it looks bad. How can I fix this, without using the CSS attribute max_height (since IE doesn't recognise that)?
  11. Pretty much what I have for checking the previous entry entered by a particular IP is this: [code] <?php if(isset($_POST['submit'])) {   $errMsg = "";                // Used for keeping track of errors   // Time 10 mins ago   $tenMinsAgo = date("Y-m-d h:is:", strototime("-10 minutes");   // Get last entry from a particular IP   $strqry = "SELECT * FRMO guestbook WHERE remote_ip = '{$_SERVER['REMOTE_ADDR']}' ORDER BY ID DESC LIMIT 1";   $query = mysql_query($strqry);   if($result = mysql_fetch_array($query, MYSQL_ASSOC)) {       if($result['date_entered'] > $tenMinsAgo) {         $errMsg .="<li>You must wait at least 10 minutes between posts.</li>\n";       }     }     .     .     .     if($errMsg == "") {       // No Errors Found -> Insert into database     }     if($errMsg != "") {       // Errors were found display $errMsg to user     } } ?> [/code] Notice that I tack on any error messages to $errMsg.  If I find that the SQL Query returns a value and the value is less than 10mins make sure I don't leave the $errMsg empty so that it will not get added to the Database. I'm thinking of increasing the 10mins to 24hrs.  I then will have to BAN particular IPs.  You can keep the Banned IPs in a seperate table to query to see it the REMOTE_ADDR matches on in the ban list.
  12. Those two things are both really cool, I'll have to check it out!
  13. Doesn't google list the IPs their bots are usually on? Can't remember where I saw the list.
  14. I have a script that would check the IP of the previous post and the IP of the person posting and datestamped. If the date stamp was less than 10mins apart i would not allow them to post again.  Though it seems the people spamming my little site were a bit more patient and would wait out the 10mins.  I was thinking about increasing the 10mins to 24hrs (though this was for a guestbook). You could also add a 'captcha' type image to stop bots from posting.
  15. Yea I completely read your post wrong sorry. As for what you're trying to do I'm unsure how to go about it.
  16. I haven't made any type of crawling script, but you would have to look for particular words (using regexp?) and parse out the data you wanted.
  17. Usually what I find is that when people are mailing through PHP its reply-to is either set up funny or that the Hotmail server sees the email as being redirected (spoofed). Say your webhost is Myhost.com but your URL is MySite.com.  MySite.com is relaying through Myhost.com and MyHost.com might not be re-writing the headers correctly and Hotmail is catching this.  MySite.com sent an email but through MyHost.com's mail servers. One thing I noticed (though I have Hotmail Live) is that I can add my domain name to its approved list. Once I did that emails were able to get through. Of course I could be completely wrong, but this has been my experience with my mail scripts.
  18. Why not flash?  I'll have to take a look but one of my coworkers had some sorta simple flash kit that allowed you to make really cool banners. It wasn't complicated to use either.  I'll try and get back with the url for it. But if you're looking for just text the HTML scrolling marquee is ok.  I'd do a search on JS for any scripts for scrolling text since the marquee is an ugly thing to use like Blink was ;)
  19. Cost and time frame can vary from one to another. Someone might charge you hourly, or might charge you on a contact basis.  What time of hourly wage?  Can be anywhere between $10 -> $100+ depending on how good they are and what people are willing to pay them. Time frame?  If this is being done entirely from scratch, that also depends on how much of it needs to be coded and what it is that needs to be coded.  Will you have any of the code for this already completed or are you looking for someone who can do it all?
  20. [code] <?php if(file_exists('path/to/file') ){   fopen('path/to/file', filesize('path/to/file');   $file = fread('path/to/file'); } else {   echo "Cannot locate file."; } ?> [/code] Just put something like that in the beginning of the script your running?
  21. How do you mean?  If you have have any other questions about things?  Just ask :)  In regards to the unlink() it would work like this: [code] <?php $filename = "myfile.txt"; if(file_exists($filename)) {   unlink($filename); } else {   echo "I cannot find the file to delete."; } ?> [/code]
  22. Yup Check out unlink() you'll also want file_exists() too to make sure the file is there before you delete (unlink) it.
  23. Try this: [code] <?php switch ($qry['editorrating']) {   case 0:     $image = "0.png";     break;   case 2:     $image = "1.png";     break;   case 2:     $image = "2.png";     break;   case 3:     $image = "3.png";     break;   case 12:     $image = "05.png";     break;   case 15:     $image = "15.png";     break;   case 25:     $image = "25.png";     break;   case 25:     $image = "25.png";     break; } echo "<td><img src=\"images/{$image}\" /></td>"; ?> [/code] Echo and Print are pretty much the same thing, I used to use print, but then I started using echo instead...The switch() function is used for multiple if...else statements. Hope that helps...
  24. It can be done either way. PHP would have to wait till the form is submitted and the server would have to check for you, whereas Javascript would do it before any of the information was sent to the server.   To do it with PHP would take a bit more code than I believe it would with javascript.  You would have to set up an array of values that were incorrect/missing etc and check them on the refresh of the page.  To me it's a bit hard to explain but it can be done. [code] <?php if(isset($_POST['submit'])) {   // user submitted form   if(isset($_POST['name'])) {     // do your stuff here   } } // Show form to user ?> <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">   <input type="text" name="name" value="<?php if (isset($_POST['name'])) echo $_POST['name'];?>" ?>   <input type="submit" value="Submit" name="submit" /> </form> [/code]
  25. You could shorten up the array code a bit: [code] <?php $content = array(1 => "day1.htm", "day2.htm", "day3.html".....etc); $date = date('d'); include($content[$date]); ?> [/code] Don't think you need the if(isset(  part though                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.