Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Oct 2002
    Location
    Milwaukee, Wisconsin
    Posts
    123
    Thanks
    1
    Thanked 0 Times in 0 Posts

    hmm phpbb code for ip search not working

    well here is what i have so far.. the IPs get encrypted into hex format BTW so yea lol hereis my code i know its not done yet:
    PHP Code:
    <?php 
    $phpbb_root_path 
    './../'
    require(
    $phpbb_root_path 'config.php'); 
    mysql_connect($dbhost$dbuser$dbpasswd); 
    mysql_select_db($dbname); 
    $post $_POST['ipaddresss']; 
    GLOBAL 
    $post
    $findip ENCODE_IP("$post"); 
    if(
    $mode=="search") { 
    $sql="SELECT * FROM phpbb_posts WHERE poster_ip='" $findip "'"
    $query=mysql_query($sql); 
    while(
    $fetch=mysql_fetch_row($query)) { 
    $usersql="SELECT * FROM phpbb_users WHERE user_id='" $fetch[3] . "'"
    $userquery=mysql_query($usersql); 
    while(
    $userfetch=mysql_fecth_row($userquery)) { 
    echo
    "$userfetch[2]"



    if(
    $mode=="") { 
    echo
    "<form action=ipsearch.php?mode=search method=POST> 
    <input type=text name='ipaddresss'><br><input type=submit> 
    </form>"


    ?>
    it says th encode_ip() functiuon is called to undefined

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,040
    Thanks
    10
    Thanked 92 Times in 90 Posts
    we need to see the ENCODE_IP() function ... + the GLOBAL call is pointless unless you are already within a function , even then if you just use $_POST['ipaddress'] then its automagically global.

    but post the ENCODE_IP() function else we cant really help.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    And don't forget to use indentation and a little more whitespace to maintain the readability of your code, stoodder. Makes it easier for us to help.

  • #4
    Regular Coder
    Join Date
    Oct 2002
    Location
    Milwaukee, Wisconsin
    Posts
    123
    Thanks
    1
    Thanked 0 Times in 0 Posts
    lol ya sorry oh yea i knew it was already global cept i couldnt get the code to work so i just tested you know??? but if you want here ius my page the thingy is located at still doesnt work so yea lol http://forum.shadowgelert.com/admin/ipsearch.php

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    And this page basically tells us what firepages had already diagnosed.. the function encode_ip is unknown in the script. Perhaps you should include the function in this script so it can be used, hm?

  • #6
    Regular Coder
    Join Date
    Oct 2002
    Location
    Milwaukee, Wisconsin
    Posts
    123
    Thanks
    1
    Thanked 0 Times in 0 Posts
    ooo ic so that means there is no fontction encode php thats why! ha thankies lots i get it now lol


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •