User IP in VB

Discussion in 'PHP' started by Barti1987, Feb 10, 2007.

  1. #1
    I am designing a script for VB 3.5.x

    I would like to know if the logged user variable is available instead of having to query for it?

    Peace,
     
    Barti1987, Feb 10, 2007 IP
  2. Icheb

    Icheb Peon

    Messages:
    1,092
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Icheb, Feb 10, 2007 IP
  3. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #3
    I do not have access to actually use VB, I tried to get help from VB official site but they don't allow third part scripts.

    I'll check the website you gave me,thanks.

    Edit: The website you have also require that I buy a version of VB.

    Peace,
     
    Barti1987, Feb 10, 2007 IP
  4. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #4
    Not sure what you mean with "logged user variable", but there's $vbulletin->userinfo, which might be what you're looking for.
     
    nico_swd, Feb 10, 2007 IP
  5. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #5
    I just need the person that is viewing the page. I am not sure if I can use $_SERVER['REMOTE_ADDR'], does VB change $_SERVER variables?

    Peace,
     
    Barti1987, Feb 10, 2007 IP
  6. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #6
    User either IPADDRESS or ALT_IP (constants)

    IPADDRSS is $_SERVER['REMOTE_ADDR'], and ALT_IP can be one of those:

    $_SERVER['HTTP_CLIENT_IP']
    $_SERVER['HTTP_X_FORWARDED_FOR']
    $_SERVER['HTTP_FROM']

    Not sure where ALT_IP is used though. I'd use just IPADDRESS.
     
    nico_swd, Feb 10, 2007 IP
  7. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #7
    Your help is appreciate, I am almost done with the script.

    Thanks!
     
    Barti1987, Feb 10, 2007 IP
  8. Icheb

    Icheb Peon

    Messages:
    1,092
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Then ask whatever guy you are doing this for to add you in vB.com's support form.
     
    Icheb, Feb 10, 2007 IP
  9. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #9
    I am not doing this for a guy. I just found a VB 3.5.x Adsense revenue sharing script, and saw that coding for VB wouldn't be hard at all, so I decided to write one on my own (based of the coding structure of the old one).

    I just added some features to it. I'll see if some of my friends who have Vbulletins can test it out.

    Peace,
     
    Barti1987, Feb 10, 2007 IP