Jump to content

xtheonex

New Members
  • Posts

    8
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

xtheonex's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi all... Jus wondering if anyone knew of any good resources/tutorials/articles... etc. explaining how to write a torrent tracker script in php an mysql? Anything would be helpful. Thanks in advance, Dave
  2. [code]session_start(); header("Cache-control: private"); mysql_connect("localhost", "******", "*******") or die (mysql_error()); mysql_select_db("local") or die (mysql_error()); if(!session_is_registered('online')){     mysql_query("INSERT INTO ppl_online (session_id, activity) VALUES ('\".session_id().\"', now()") or die (mysql_error());     session_register('online'); } if(session_is_registered('online')){             mysql_query("UPDATE ppl_online SET activity=now() WHERE session_id=\".session_id().\"") or die (mysql_error()); } $limit_time = time() - 300; // 5 Minute time out. 60 * 5 = 300 $sql = mysql_query("SELECT * FROM ppl_online WHERE UNIX_TIMESTAMP(activity) >= $limit_time") or die (mysql_error()); $visits = mysql_num_rows($sql); ?>[/code] Why the buggery aint this working? It registers the session variable "online" as null yet doesnt add anything to the database :-/ Any help would be grateful guys. Thanks in advance, Dave
  3. I can sleep, im just gettin quite obsessed with php at the mo. I started learnin it for about a year and then took a break for about a year and now im gettin back into it. Only problem ive got is i need projects so that i can work on something to really test myself if ya know what i mean.
  4. Thanks guys. Most helpful and very prompt for 2 am, lol. Or you may not be in the UK like me, lol.
  5. Hi guys. How do i create a preview of a string? Like if i bring something from a mysql db, the string name is $fetchbookmark['url']. But that string is too long to fit into the cell i want it to. So what i want to do is to take like the first 50 chrs for example of that string and just show them. Ive seen it on forum scripts and such so i know its possbile. Just not sure how to do it myself. Thanks in advance, Dave
  6. xtheonex

    max-width...

    Hi all. Jus a quickie for ya. How cross-broswer safe is the max-width css function when used on an image? I messed about with the GD image library for php for a couple of hours to no avail however the max-width function of css gives me the desired effect in IE and Firefox. Just wondering if it was buggy or un-usable for other browsers. Thanks in advance, Dave
  7. Thanks guys. toplay, unfortunatley, im not very well versed with manual mysql type stuff. I usually use PHPMyAdmin to administer my databases. Its a cheats way i know but it works just fine for me at the moment. I will learn to use mysql manually one day but im concentrating more on using it with php to make scripts and such like. redarrow. The function works perfectly and is exactly what i was looking for. Cheers :D
  8. Hi guys. This is probably really simple but i started learning php/mysql about two years ago. Had a "break" for a while and now im coming back to it with a couple of projects i need a little help if you can spare the time. I have a mysql database with a "datetime" colum. When i fetch the string from the database it comes in an "unfriendly format. I'd Like to be able to firstly, split the time and date into separate strings. And also reverse the date format. The format it is fetched from, and stored in the database is yyyy-mm-dd hh:mm:ss however on fetching it from the database i'd like to be able to split the date and time, and reverse the date format so its dd-mm-yyyy. If anyone can spare some time to explain how to do it id be very grateful. Thanks in advance, Dave
×
×
  • 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.