Jump to content


Sphere's coding problems


  • Please log in to reply
19 replies to this topic

#1 Sphere

Sphere

    The moth next to my brain is Bart, say hi to him if you like

  • Sponsor
  • PipPipPipPipPip
  • 2,355 posts
  • Location:*tap* Behind ya!
  • Interests:I'm a Dutchy, that means I'm not a German (which doesn't sound/look the same to me!) also, being a Dutchy means I'm an idiot... sort off!

    And I def. need to get a real life again... I'm bored with my current life, ideas can be pm'd to me!
  • Country:Dutchyland

Posted 08 January 2009 - 01:40 AM

Does anyone have a full array of all the browsers?
I did find a code to find them all in the http_user_agent command, but it was all like "if then else" coded, and I'm lazy, I haven't found a fingerprint => agent-name array yet.

If you have it, I'd love to get a copy of it for my statistics engine
(yes, I coded 99% of my website myself, including the posting engine, only the styling is a rip :rofl_mini: )

#2 Sphere

Sphere

    The moth next to my brain is Bart, say hi to him if you like

  • Sponsor
  • PipPipPipPipPip
  • 2,355 posts
  • Location:*tap* Behind ya!
  • Interests:I'm a Dutchy, that means I'm not a German (which doesn't sound/look the same to me!) also, being a Dutchy means I'm an idiot... sort off!

    And I def. need to get a real life again... I'm bored with my current life, ideas can be pm'd to me!
  • Country:Dutchyland

Posted 09 January 2009 - 01:54 AM

Ok,
I am working on editing my PHP news and statistics engine, but, I kinda suck at making it un-hackable.
Besides that, I haven't really fully made it run from a single scripting style yet because I've been editing for a while.

But, my question is. If you think I can trust you and you'd like to review my full engine (or help me improve), just because you like it, please contact me?

I would not like some hacking-script-moron to hack my server/site/script, so please, if you think you can help me, please do, but don't abuse my (lack of) coding skills.

#3 Sphere

Sphere

    The moth next to my brain is Bart, say hi to him if you like

  • Sponsor
  • PipPipPipPipPip
  • 2,355 posts
  • Location:*tap* Behind ya!
  • Interests:I'm a Dutchy, that means I'm not a German (which doesn't sound/look the same to me!) also, being a Dutchy means I'm an idiot... sort off!

    And I def. need to get a real life again... I'm bored with my current life, ideas can be pm'd to me!
  • Country:Dutchyland

Posted 09 January 2009 - 02:01 AM

Ok, my problem is the following:
I want to register all post-views, except my own and bot-views.
The first is no problem, that's already fixed, but when I try to exclude bots, the engine doesn't work at all (not due to coding errors), or it stops breaking at a local IP (or my own external for that matter.)

My concept was:
Fetch from database (I got a list of bot-id's)
compare to current agent
break the registration of 'new view' if true.

The last part seems to fail. I know for sure I got the comparison to the database right (it's going through an array, comparing the exploded current hostname to the known bot-hostnames.)

Anyone please help me out, because I'm stuck.


p.s.
Yes, I'm working on my site a lot lately

#4 Sphere

Sphere

    The moth next to my brain is Bart, say hi to him if you like

  • Sponsor
  • PipPipPipPipPip
  • 2,355 posts
  • Location:*tap* Behind ya!
  • Interests:I'm a Dutchy, that means I'm not a German (which doesn't sound/look the same to me!) also, being a Dutchy means I'm an idiot... sort off!

    And I def. need to get a real life again... I'm bored with my current life, ideas can be pm'd to me!
  • Country:Dutchyland

Posted 11 January 2009 - 05:52 PM

Fixed, fixed and fixed!

Ow yeah, everything seems to work excellent! :rofl_mini:

#5 stormrosson

stormrosson

    Established Member

  • Global Moderator
  • PipPipPipPipPip
  • 1,246 posts
  • Location:Silver City ,New Mexico
  • Interests:stuff
  • Country:yes

Posted 11 January 2009 - 06:23 PM

:chriso: good work buddy :clarky:

#6 Sphere

Sphere

    The moth next to my brain is Bart, say hi to him if you like

  • Sponsor
  • PipPipPipPipPip
  • 2,355 posts
  • Location:*tap* Behind ya!
  • Interests:I'm a Dutchy, that means I'm not a German (which doesn't sound/look the same to me!) also, being a Dutchy means I'm an idiot... sort off!

    And I def. need to get a real life again... I'm bored with my current life, ideas can be pm'd to me!
  • Country:Dutchyland

Posted 11 January 2009 - 07:04 PM

I kinda think I shouldn't code at night anymore :clarky:

I'll be back when I run into new problems :chriso:

(not advertising, click sig-image, I'm soo gonna be in trouble with the moderators here now!)

#7 stormrosson

stormrosson

    Established Member

  • Global Moderator
  • PipPipPipPipPip
  • 1,246 posts
  • Location:Silver City ,New Mexico
  • Interests:stuff
  • Country:yes

Posted 11 January 2009 - 07:21 PM

:chriso: errrrrrr you are a mod here :clarky:

#8 Sphere

Sphere

    The moth next to my brain is Bart, say hi to him if you like

  • Sponsor
  • PipPipPipPipPip
  • 2,355 posts
  • Location:*tap* Behind ya!
  • Interests:I'm a Dutchy, that means I'm not a German (which doesn't sound/look the same to me!) also, being a Dutchy means I'm an idiot... sort off!

    And I def. need to get a real life again... I'm bored with my current life, ideas can be pm'd to me!
  • Country:Dutchyland

Posted 11 January 2009 - 07:29 PM

View Poststormrosson, on Jan 11 2009, 08:21 PM, said:

:chriso: errrrrrr you are a mod here :giggle:
Ow hey, hmmm, then well, ok, all good :clarky: :P

p.s.
If you have some fun coding to add to my site (background-engine wise or frontend wise)
Let me know!
So far, my engine consists of:
News:
Posting
Editing (Poster or Admin)
Deleting (Poster or Admin)

Comments:
Edit (Admin only)
Delete (Admin only)

User:
Edit userpage (admin or user itself only)
Edit User info (admin or user itself only)
Add user (admin only)
Delete user (admin only)

Statistics:
Most visited post
User visits (and extended info (OS, resolution, screensize, browser, IP, hostname, worldmap, referer, last visit etc.)
Visiting system info (OS, browser, colordepth, CPU, etc.)
Overview of referers
Visitors countries
Visiting Bots

And amount of clicks, viewable by hour, day, month, year etc.

Worldmap (infosniper) but waaay better improved (at the visitor part)

Most of this is either coded by me, or improved by me after getting some old, crappy engine part from tha intarblag (which pretty much comes down to me recoding the entire engine to improve on all the flaws)

#9 Sphere

Sphere

    The moth next to my brain is Bart, say hi to him if you like

  • Sponsor
  • PipPipPipPipPip
  • 2,355 posts
  • Location:*tap* Behind ya!
  • Interests:I'm a Dutchy, that means I'm not a German (which doesn't sound/look the same to me!) also, being a Dutchy means I'm an idiot... sort off!

    And I def. need to get a real life again... I'm bored with my current life, ideas can be pm'd to me!
  • Country:Dutchyland

Posted 13 January 2009 - 10:06 PM

New project, if you have something, tell me:
I found out I'm missing an "ZOMG I LOST MY PASSWORD" function.

If you have something, let me know!

My thoughts:
A page where the user enters his/her username

A separate database is kept, for this user a key and temporary password is created (hashed, offcourse)
A link is created with the key as argument
The user gets an e-mail with his temporary password and a link to the page to set a new password (thus needing to enter his temporary password, following the correct key-link)

Well, that's the basic idea pretty much, got the database pretty much set up (works on user-id of the official userdatabase)

#10 Sphere

Sphere

    The moth next to my brain is Bart, say hi to him if you like

  • Sponsor
  • PipPipPipPipPip
  • 2,355 posts
  • Location:*tap* Behind ya!
  • Interests:I'm a Dutchy, that means I'm not a German (which doesn't sound/look the same to me!) also, being a Dutchy means I'm an idiot... sort off!

    And I def. need to get a real life again... I'm bored with my current life, ideas can be pm'd to me!
  • Country:Dutchyland

Posted 14 January 2009 - 05:49 PM

Ok, problem solved!

Time for the next challenge.

Coded the new-password system all by myself entirely, except for some lay-out thingy's, I gotta get back to ripping and updating to a real code... writing completely myself is way too much work!

Yes, I rip, then rewrite functions etc, make it look better, recode ugly code etc. works faster usually

#11 Sphere

Sphere

    The moth next to my brain is Bart, say hi to him if you like

  • Sponsor
  • PipPipPipPipPip
  • 2,355 posts
  • Location:*tap* Behind ya!
  • Interests:I'm a Dutchy, that means I'm not a German (which doesn't sound/look the same to me!) also, being a Dutchy means I'm an idiot... sort off!

    And I def. need to get a real life again... I'm bored with my current life, ideas can be pm'd to me!
  • Country:Dutchyland

Posted 18 January 2009 - 09:32 PM

Something a bit new, or, at least, a new project:
You might've heard of the InfoSniper Worldmap
Well, that system is nice, but the worldmap application lacks pretty much everything actually, it's too basic, so I edited it to my needs and adjusted it to work on MySQL.
After my initial work, I e-mailed the owner of worldmap about my improvements.

So, here's the deal:
I'm gonna make a way better Worldmap system (basing it on my already adjusted code).
The point is to exclude searchbots (those are annoying, 10000 results for the same city etc.), save it all into databases, and offcourse check if the user doesn't already exist in the database, and/or from a bot-database, if it's not a bot by any chance. (Most of this I have, but all intergrated)

And offcourse I'll be needing to write an installer for this, so its easy for everybody.

My main problem now is the installer. Because I want to be able to write the database info to a file, so the user doesn't have to adjust that himself in advance, but just can enter it on a web-interface.

My next problem is to export my extremely overcomplicated bot-detection database to a simple database, with IP's and (part of) hostmasks.
Third is to make it all a bit less cluttercode, no problems there once it works.
Fourth is to create the entire package (which is the least of my worries once the previous works)

If you have any experience mainly on fopen/fwrite etc. in PHP, let me know how to best use this system.

Most needed at this point:
A database/list of bots, consisting of the following info:
botname (from useragent), first two parts of their IP (since only the third and fourth often change)
All preferably as much as possibe. I got about 8 bots id'd by now, working on more (yes, my own system that is running has too many info and is too complicated to easy-transport)

#12 Tweak

Tweak

    Established Member

  • Members
  • PipPipPipPipPip
  • 674 posts
  • Country:US

Posted 19 January 2009 - 05:09 AM

I thought this was a blog/personal journal...lol. J/K. :roadrunner:

#13 Guest_scaramonga_*

Guest_scaramonga_*
  • Guests

Posted 19 January 2009 - 05:46 AM

View PostTweak, on Jan 19 2009, 05:09 AM, said:

I thought this was a blog/personal journal...lol. J/K. :drunk:


Get back to what you do best Jimbo..........breasts, bikini's and thongs ;)

Leave the 'jokes' to me.

:roadrunner:

#14 Tweak

Tweak

    Established Member

  • Members
  • PipPipPipPipPip
  • 674 posts
  • Country:US

Posted 19 January 2009 - 06:55 PM

View Postscaramonga, on Jan 19 2009, 12:46 AM, said:

Get back to what you do best Jimbo..........breasts, bikini's and thongs ;)

Leave the 'jokes' to me.

:drunk:

Well no one really replies, well if you count nuel then one person did...so insert your joke already Rik, this thread needs something to spice it up a bit. :roadrunner:

#15 Sphere

Sphere

    The moth next to my brain is Bart, say hi to him if you like

  • Sponsor
  • PipPipPipPipPip
  • 2,355 posts
  • Location:*tap* Behind ya!
  • Interests:I'm a Dutchy, that means I'm not a German (which doesn't sound/look the same to me!) also, being a Dutchy means I'm an idiot... sort off!

    And I def. need to get a real life again... I'm bored with my current life, ideas can be pm'd to me!
  • Country:Dutchyland

Posted 19 January 2009 - 07:22 PM

All fine by me :roadrunner:

But if you got a nice database of bot-info, I'd be happy too :drunk:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users