Jump to content

GamingWarrior

Members
  • Posts

    36
  • Joined

  • Last visited

    Never

Posts posted by GamingWarrior

  1. Thx guys.

    I have my work cut out for the next couple of days patching these i'll get back to you once i'm done. just a question how did someone manage to upload nothing and have the upload script let you? it should check, did you add it to the tables manually?

  2. Hey Guys

    I'm hoping to open my site to public beta shortly but don't want a bunch of no lifers to bring it down with sql exploits and what ever other exploits exist. So basic what I'm asking from you guys is to try and find anything that may be used against me after release. Try not to brake anything but i do have a back-up just trying to avoid having to use it.

    The url is http://themespot.info/ Now go wild :)

    -Gaming Warrior

  3. When i crate a folder using mkdir($foldername, 0777);

    it makes the folder chmod 0755 and unable to delete the folder or the contents of it, this is a huge problem. So my question is how do i make a folder chmod 0777 so that i can delete it over ftp.

  4. Ok i think i must be doing a stupid mistake.

    basically $number is and Array

    echo $number (prints "Array")

    print_r($number) (prints "Array ( [COUNT(theme_id)] => 4 )")

     

    but this is the part the i cant work out

     

    echo $number[COUNT(theme_id)] (prints nothing)

     

    why would it not print 4 ?

     

  5. http://1337gamerz.recoding.net/IPLocations.csv

    Right Click, Save As that file.

     

    Then Use this

    function ip2loc($ip) {
    list($ip1,$ip2,$ip3,$ip4) = explode('.',$ip);
    $ipn = $ip4+$ip3*1000+$ip2*1000000+$ip1*1000000000;
    $list = file('IPLocations.csv');
    foreach($list as $line) {
       $line = str_replace('"','',$line);
       $line = explode(',',$line);
       $lineip = $line[0];
       list($lineip1,$lineip2,$lineip3,$lineip4) = explode('.',$lineip);
       $lineipn = $lineip4+$lineip3*1000+$lineip2*1000000+$lineip1*1000000000;
       $lineip2 = $line[1];
       list($lineip1,$lineip2,$lineip3,$lineip4) = explode('.',$lineip2);
       $lineipn2 = $lineip4+$lineip3*1000+$lineip2*1000000+$lineip1*1000000000;
       if ($ipn >= $lineipn && $ipn <= $lineipn2) {
       		//for the full name:
    	//$loc =  $line[5];
    	//for the two letter code:
    	$loc = $line[4];
          break;
          }
       }
    if(empty($loc)) {
    $loc = 'default_here';
    }
    return $loc;
    }
    
    $ip = $_SERVER['REMOTE_ADDR'];
    echo $loc
    

     

    That should work, unless i messed up somewhere, if it doesn't let me know :)

  6. Ok, this is driving me crazy.

    I want to crop:

    test.png

    to

    test_out.png

     

    but all the scripts i find to crop seem to just shrink the image and cut the edges to make it keep the ratio :(

    If someone can just tell me where to start i might be able to work it out from there.

     

    Thanks

  7. I've looked around but i can't seem to find away to force download of certain file types, i tried

    <Files *.ptf>

    ForceType application/octet-stream

    Header set Content-Disposition attachment

    </Files>

    in htaccess but it just made the folder which had that file in it unable to be opened at all :S

     

    Any help would be great :)

  8. Here is a little head start for you.

    <?PHP
    
    $clanid = "2140";
    
    $xml = simplexml_load_file('http://bf2142tracker.com/livefeed/xml_clanprofile.php?clanid=' . $clanid);
    
    echo'
    <table border="1">
      <tr>
        <th colspan="8" scope="col">Battle Feild 2142 Clan Stats</th>
      </tr>
      <tr>
        <td><div align="center">#</div></td>
        <td><div align="center">Playename</div></td>
        <td><div align="center">Country</div></td>
        <td><div align="center">Wins</div></td>
        <td><div align="center">Losses</div></td>
        <td><div align="center">Kills</div></td>
        <td><div align="center">Deaths</div></td>
        <td><div align="center">Status</div></td>
      </tr>';
    foreach ($xml->PLAYERLIST->PLAYER as $Player) {
    $rank = $Player->PLAYERRANK;
    $name = $Player->PLAYERNAME;
    $profile = $Player->PLAYERSTATSURL;
    $flag = $Player->PLAYERCOUNTRY;
    $wins = $Player->PLAYERWINS;
    $loss = $Player->PLAYERLOSS;
    $kills = $Player->PLAYERKILLS;
    $deaths = $Player->PLAYERDEATHS;
    $status1 = $Player->PLAYERSTATUS;
    
    if ($status1 == 1) {
    $status = online;
    }else{
    $status = offline;
    }
    
    if ($flag == "-") {
    $flag = "unknown";
    }
    
    echo'
      <tr>
        <td><img src="http://bf2142tracker.com/Images/bf2142_rankimages/ranksmall_' . $rank . '.gif"></td>
        <td><a href="' . $profile . '" target="_blank">' . $name . '</a></td>
        <td><img src="http://bf2142tracker.com/Images/CountryIcons/' . $flag . '.gif"></td>
        <td>' . $wins . '</td>
        <td>' . $loss . '</td>
        <td>' . $kills . '</td>
        <td>' . $deaths . '</td>
        <td><img src="http://bf2142tracker.com/Images/bf_user_' . $status . '.gif"></td>
      </tr>';
    }
    echo'
    </table>
    ';
    ?>
    

     

    That will out put http://1337gamerz.recoding.net/2142stats/2142.php

    I think its is to sorting via global score but something is wrong with the xml feed that is making all global scores 0 :S

  9. hmm.... I think this would be easier if you did it maybe via ip and used sql.

    That way when some goes to upload an image you check the ip do a search in the sql ind and other image they have upload and presto.

     

    --EDIT--

     

    What are the chances, I uploaded an image to you site yesterday when you posted it in the beta section part. i just revisited your site, clicked the random image button and the first image it showed me was the one i uploaded.

     

    =back on topic=

  10. thanks

    =-=-=-=-=-=-=-=-=-=-=

    Added

    -Clan Stats Tab(this tab will only show if a clan tag is present)

    -Error handlers(This check that the user name entered is valid)

    On the drawing board

    -A friends tab for folks not in a clan, due to the area i have to work with and trying to keep the size down it will be one or the other.

     

    If there are any other functions you would like to see added please let me know.

    =-=-=-=-=-=-=-=-=-=-=

×
×
  • 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.