Jump to content

jackpf

Members
  • Posts

    1,410
  • Joined

  • Last visited

    Never

Everything posted by jackpf

  1. Yeah, it would because it's superglobal And yeah, I personally wouldn't do something like this. It's almost as bad as magic quotes. I'd just run the necessary functions on each variable as and when you need it.
  2. Huh? All that does is run strip_tags() on the entire $_POST array. You can then just use it like normal. But all the data will have had html tags removed.
  3. Yeah. Just do something like this foreach($_POST as $key => $value) { $_POST[$key] = strip_tags($_POST[$key]); }
  4. $model = reset(explode(' ', $model)); Something like that?
  5. Ok, my new alias is "jackpf the ripper". That would be pretty fun though...
  6. Oh yeah, I changed it to use substr() to just append "..." if the text is too long now. But yeah, before there was a yen sign (¥) where the \n should be. I'll change it back.
  7. Lol. Uhh...ok, Make a table. On each page request, make a query that updates a field with a timestamp. Then you can determine whether a user is online by checking when they last requested a page. That's what I do on my site. It's pretty straight forward. But yeah, have a go. If you get stuck with something specific, just post back.
  8. Good...morning all. So yeah, I'm making a random quotes thing, probably like so many of you have done so yourselves. Anyway, I'm using wordwrap(), to wordwrap the quotes (suprisingly). But instead of inserting a new line, it inserts some weird symbol. I couldn't find anyting on google. Just wondering how you guys managed it. Yeah, this is basically my code thus far: $sql = mysql_query("SELECT * FROM `$tb_Quote` WHERE `Status`='1' ORDER BY RAND();") or trigger_error(mysql_error(), E_USER_ERROR); $fetch = mysql_fetch_array($sql); $author = $fetch['Author']; $quote = wordwrap($fetch['Quote'], 50); $img = imagecreate(450, 75); imagecolorallocate($img, 0, 0, 0); $text_colour = imagecolorallocate($img, 255, 255, 255); $line_colour = imagecolorallocate($img, 128, 255, 0); imagestring($img, 2, 2, 5, 'Quote from '.$author, $text_colour); imageline($img, 0, 20, imageSx($img), 20, $line_colour); imagestring($img, 2, 2, 30, $quote, $text_colour); header('Content-type: image/png'); imagepng($img); imagedestroy($img); Cheers, Jack. Oh, here's an example btw. Just refresh the page a couple of times to get a long quote, and you'll see what I mean - http://jackpf.000space.com/quote.php
  9. Just wondering...how do you install stuff onto a client's PC with javascript? That would be cool And are you sure it's not your host? Is it actually in the file, if you open the file to edit it, not just on your source code? Some hosts automatically append scripts to all sites, like stat counters and stuff. But yeah, try something like this: document.write(unescape(bhioa));
  10. Have a table with `Username` and `Unixstamp` or someting. Then record the unix stamp of each player in the database on every page visit. Then work out who's online by fetching all rows with a `Unixstamp` >= time() - 600 or whatever limit you want to time people out with.
  11. Create a file called .htaccess duhh
  12. Yeah you can. Put this in a HTML file: <input type="radio" checked="checked" /> And define "not working"...
  13. If you have a text or varchar field it should preserve zeros.
  14. jackpf

    hits meter

    Just make a file that increments some field in a database. Then include it on every page. You may also want to set a cookie or something to make sure people aren't just holding down f5.
  15. You could just do this $date = (string)$date; $date = explode('-', $date);
  16. I'd get dreamweaver on Torrent if I wanted it. Not that I do, Notepad++ But yeah, isn't it like £200? What a joke.
  17. You could use a session and pass the session ID through the URI.
  18. //This function separates the extension from the rest of the file name and returns it function findexts ($filename) { $filename = strtolower($filename) ; $exts = split("[/\\.]", $filename) ; $n = count($exts)-2; $exts = $exts[$n]; $n2 = count($exts)-1; $exts2 = $exts[$n2]; return $exts.$exts2; Something liek that?
  19. Lol I don't think this board is for the questions you think it is.
  20. Yeah, I already tried that with no luck =\ How does that not work?
  21. Only if PHP stops working for some reason. Which I have never heard of.
×
×
  • 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.