Jump to content

TheSky

Members
  • Posts

    102
  • Joined

  • Last visited

    Never

Everything posted by TheSky

  1. point of my question is how should you store your data on that situation (i hope that clears up) so i dont speak well in english i hope you forgive me ?
  2. i have question how should you save data if you have user data like that value value value value value value value value value value value and then all that history if you tell storing in mysql is best solution, then tell how would look scrupture in your mind
  3. (substr($killdeaths=$Kills/$Deaths,0,4)); im sure im doing it wrong
  4. thanks it worked fine only what i need now is that it saves every time in new line
  5. this is part of my code how should i make fwrite to get in txt file name,Level,CT,Kills,Deaths,killdeaths,AS values ? any help will be welcome $file="$name.txt"; $open=fopen($file,"a"); if($open){ fwrite($open,$name,$Level,$CT,$Kills,$Deaths,$killdeaths,$AS); fclose($open); }
  6. ok i need one thing more know how i make full url with url$nickname $url=('http://www.gamersfirst.com/warrock/?q=Player&nickname='$nickname);
  7. i just tryed with http%3A%2F%2Fwww.gamersfirst.com%2Fwarrock%2F%3Fq%3DPlayer%26nickname%3Destonia8 and it is working now i have question how i can convert http://www.gamersfirst.com/warrock/?q=Player&nickname=estonia8 to http%3A%2F%2Fwww.gamersfirst.com%2Fwarrock%2F%3Fq%3DPlayer%26nickname%3Destonia8
  8. hmm now i think url http://www.gamersfirst.com/warrock/?q=Player&nickname= is not possible to get becouse it has ?=
  9. it's not realy important what i got on referer connect part is ok i think ? becouse i dont get any errors but i think there is some mistake on data filtering
  10. Hey agen i have problem i need info from other webpage <?php // get as ? $url=$_GET['url']; // value of script $website = $url; $referer = 'olar.eu'; $useragent = 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)'; $filename = basename($url); // connect $curl_handle=curl_init(); curl_setopt($curl_handle,CURLOPT_USERAGENT,$useragent); curl_setopt($curl_handle,CURLOPT_AUTOREFERER,$referer); curl_setopt($curl_handle,CURLOPT_URL,$website); curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,5); curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1); $source = curl_exec ($curl_handle); curl_close ($curl_handle); $a=preg_match("/>Level:.*.\n.*.>([0-9]*)</",$source,$b); $Level = $b[1]; echo "Level: $Level"; ?> i get only empty value url=http://www.gamersfirst.com/warrock/?q=Player&nickname=admin-b13r
  11. my mistake was on closing correct $query=("INSERT INTO Error (id,request,ip,referer,agent) VALUES ('NULL','$request','$ip','$referer','$agent')"); but thanks anyways
  12. you are missing } at the end? //Wall_Updates class Wall_Updates { // Updates public function Updates($uid) { $query = mysql_query("SELECT M.msg_id, M.uid_fk, M.message, M.created, U.username FROM messages M, users U WHERE M.uid_fk=U.uid and M.uid_fk='$uid' order by M.msg_id desc") or die(mysql_error()); while($row=mysql_fetch_array($query)) $data[]=$row; return $data; } //close }
  13. Hey im agen stuck on code i get You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 but i think i have all correct if i submit i get values but that dont add in database <?php //Values if(isset($_POST['Submit'])) { $request = preg_replace("/[^0-9a-zA-Z]/","",$_SERVER['REQUEST_URI']); $ip = preg_replace("/[^0-9a-zA-Z]/","",$_SERVER['REMOTE_ADDR']); $referer = preg_replace("/[^0-9a-zA-Z]/","",$_SERVER['HTTP_REFERER']); $agent = preg_replace("/[^0-9a-zA-Z]/","",$_SERVER['HTTP_USER_AGENT']); //Open connection include('connectx.php'); //Test is there connection available $query=("Select * from Error where date='NOW()'"); $result= mysql_query($query); $num=mysql_num_rows($result); //Add data $query=("INSERT INTO Error (id,request,ip,referer,date,agent) VALUES ('NULL','$request','$ip','$referer',NOW(),'$agent'"); if (@mysql_query($query)) { echo('<p>Error code has succesfuly send</p>'); } else { echo ("Error was in submiting code").mysql_error(); } mysql_close(); } ?> any help will become welcome
  14. hmm but if i have more then one $row['name']
  15. i have made query and i want replace with no data N/A i have tryed with swich but no luck if (($row['name']) = empty) { echo('n/a'); }
  16. yes i got it but now i need 1. username (here is status) but i get K�lalineAdministraatorK�lalineK�laline all in same row is there $somevalue possible ?
  17. <?php include("xxxx.php"); $sql=mysql_query("SELECT * FROM users ORDER BY userid DESC LIMIT 0,5") or die(mysql_error()); $x=0; while($row=mysql_fetch_array($sql)) { ($x+1).'. '.$row['username'].'. kasutaja tüüp '.$row['userlevel'].'<br />'; //let's add some define values define('userlevel'); if(defined('1')) { echo Külaline . '<br />'; } if(defined('9')) { echo Administraator . '<br />'; } $x++; } ?>
  18. im doing it wrong can some one help me ? , thanks { define('userlevel'( 9="admin" , 1="guest")); }
  19. oh then there is no way to check?
×
×
  • 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.