+ Reply to Thread
Results 1 to 10 of 10

Thread: A little PHP question

  1. #1
    shanes's Avatar
    shanes is offline x10Hosting Member shanes is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    35

    A little PHP question

    Well i'm a total 'newbie' when it comes to PHP , I know close to nothing , anyway I recently downloaded a CMS and I was looking through the source and I found this , i'm wondering what this code does as it seems dodgy , to me it looks like the site is logging the information I enter into my mysql database and sending it off to a 3rd party site , I just want someone to confirm it.
    Here's the code:
    PHP Code:
    $domain $_SERVER['HTTP_HOST'];
    $ip $_SERVER['REMOTE_ADDR'];
    $report file_get_contents("*Removed*/logger/installs.php?d=".$domain."&i=".$ip.""); 
    It probably isn't anything bad but better safe than sorry :lockd:


  2. #2
    leafypiggy's Avatar
    leafypiggy is offline Community Advocate leafypiggy is on a distinguished road
    Join Date
    Aug 2007
    Location
    Massachusetts
    Posts
    2,228

    Re: A little PHP question

    1. What is the CMS?

    2. What is the name of the file?

    3. I think it is logging your info like time and date into your mysql database, joomla does that.

  3. #3
    shanes's Avatar
    shanes is offline x10Hosting Member shanes is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    35

    Re: A little PHP question

    Quote Originally Posted by leafypiggy View Post
    1. What is the CMS?

    2. What is the name of the file?

    3. I think it is logging your info like time and date into your mysql database, joomla does that.
    1. You woun't know the CMS as it's a made by a user on a forum I go on , it's called HSP (Habbo site panel)

    2. Ermm can't remember , it's a config file that you go on to create a username for the CMS

    3 Probably is , wasn't too sure so i asked , I'm guessing it's a way of checking who uses their panel


  4. #4
    Bryon is offline Administrator Bryon has disabled reputation
    Join Date
    Apr 2005
    Location
    Northfield, NH
    Posts
    7,608

    Re: A little PHP question

    Looks like it is logging your site's domain and your IP address to some remote site. What is the *Removed*? What was there? Was it a URL? That is what it looks like

  5. #5
    coolcat50 is offline x10Hosting Member coolcat50 is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    12

    Re: A little PHP question

    yeah its probably a removed link and just ask the person you got it from

  6. #6
    shanes's Avatar
    shanes is offline x10Hosting Member shanes is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    35

    Re: A little PHP question

    I removed the domain manually lol I only removed the domain name , the extension of the url is still there.

    Thanks for your help , I'm guessing that's their way of tracking sites , I still think it's kinda dodgy though


  7. #7
    Slothie's Avatar
    Slothie is offline Lord Of The Keys Slothie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Singapore
    Posts
    1,432

    Re: A little PHP question

    Heh, I have similar code in a number of free scripts I've released over the years, its nice to know who's using 'em.

    Easiest 70 points you'll make on x10

    Feel free to add my reputation by clicking on the if you found my post helpful to you :P


    If I am not responding to your PMs, that means I am ignoring you. Take a hint.



    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0


  8. #8
    Thewinator is offline x10 Lieutenant Thewinator is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    [NL]
    Posts
    256

    Re: A little PHP question

    PHP Code:
    $domain $_SERVER['HTTP_HOST']; 
    Gets the domain the file is running from.
    PHP Code:
    $ip $_SERVER['REMOTE_ADDR']; 
    Gets the ip address of the visitor of your site.
    PHP Code:
    $report file_get_contents("*Removed*/logger/installs.php?d=".$domain."&i=".$ip.""); 
    Is actualy a bit of a useless line unless the $report is actualy echo'ed later.
    But basicly it loads the response of /logger/installs.php to the domain and ip sent to it.
    If you want to find out what that file does with that data then you should open it (if you have access to it), and look for
    PHP Code:
    $_GET['d'
    and
    PHP Code:
    $_GET['i'



  9. #9
    Slothie's Avatar
    Slothie is offline Lord Of The Keys Slothie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Singapore
    Posts
    1,432

    Re: A little PHP question

    Its not quite useless, it sends the domain and the IP to installs.php via GET.

    They do the processing from there. The file itself probably outputs nothing at all.

    Easiest 70 points you'll make on x10

    Feel free to add my reputation by clicking on the if you found my post helpful to you :P


    If I am not responding to your PMs, that means I am ignoring you. Take a hint.



    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0


  10. #10
    Thewinator is offline x10 Lieutenant Thewinator is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    [NL]
    Posts
    256

    Re: A little PHP question

    I was refering to the designating it to the variable.
    just the file_get_contents command would suffice to send information using the get method. ;)
    And like you said it probebly outputs nothing, so it no use to store that nothing.
    Last edited by Thewinator; 11-20-2007 at 01:20 PM.



+ Reply to Thread

Similar Threads

  1. tons of PHP Resources
    By Chris S in forum Scripts & 3rd Party Apps
    Replies: 10
    Last Post: 01-16-2009, 10:07 AM
  2. Unstand PHP?
    By o0slowpaul0o in forum Tutorials
    Replies: 8
    Last Post: 01-07-2008, 09:16 PM
  3. Sigo con problemas con phpbb2
    By reciecho in forum Soporte
    Replies: 7
    Last Post: 10-20-2007, 06:28 PM
  4. "PHP Startup: Invalid Library" - Interesting error
    By javaguy78 in forum Free Hosting
    Replies: 5
    Last Post: 03-27-2007, 02:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers