Jump to content

Silverado_NL

Members
  • Posts

    105
  • Joined

  • Last visited

Everything posted by Silverado_NL

  1. windows = wamp linux = xamp mac = ?? mamp http://www.mamp.info/en/index.html google yay
  2. pugs dont suck because they are pugs. we had a group called midnight runners that pugged the bigger 25mans without problems.(yes before the big nurf) even had some people occasionally running around in greens and still managed to 1 shot 3 first bosses in BT and usually take about 2-3 attempts on teron. pugs suck because people dont do whatever u tell them. btw some clans have been clearing almost ALL of bt in just green/blue gear, without ANY epics. as long as you do what should be done there is almost no need for epics, except tanks might get crushed like hell sometimes.
  3. IE should be optional when windows 7 comes out,and has to be checked at setup to be installed. i only seen ie8 run under win xp and am really content with it(was only using FF before). works super fast and nice new features to.
  4. starting out on big prebuild package's havent helped me either. i also recommend starting out with small parts of script that u could piece together at the end. best is just to code yourself instead of copy&paste it, just to get it into your head. and even when u start knowing alot of functions and u been writing some script your almost always gonna be doing something wrong in some way. that why showing other people your code is really helpfull. they might be able to spot things u have overlooked or havent thought about. i myself started out with basic stuff like syntax and logical operators and trying to make my own calculater using form boxes for inputs, then started reading about looping functions and arrays. tutorials right here on phpfreaks but also other site's like http://www.tizag.com/phpT helped me alot. one book i recommend is http://www.freeopenbook.com/php5-for-dummies/. and php.net is great to find all sort of functions. offcourse u also could search one of the big torrent site's for php books
  5. also you havent qouted the $_GET variable array key name's. good habit to do that and keep your script nice and fast!
  6. uhm i have phpmyadmin installed and im sure it delete's the entire DB if i click drop. you will ofcourse need the permissions to do this(usually root). as for empting table's dont you mean TRUNCATE?
  7. if this code page is the whole page, you are missing php tags <?php and ?> to start your php. and u are also missing echo statements for outputting the html. might be that u left em out to keep the posted code short, if not this might be your problem. <?php echo "<table width='70%' border='0' cellspacing='1' cellpadding='1' bgcolor='#00000'> <form method='post'> <tr bgcolor='$config[altcolora]'> <td width='100%' valign='center' align='left' colspan='2' background='$config[bg]'> <strong>Challenge</strong> </td> </tr> <tr bgcolor='$config[altcolora]'> <td width='40%' valign='center' align='left' background='$config[cellbg]'>Game</td> <td width='60%' valign='center' align='center' background='$config[cellbg]'> <select class='button' name='login[id]' value='$login[id]'>"; $teams=mysql_query("SELECT teamid,ladderid FROM membersteams WHERE memberid='{$_COOKIE['tid']}' "); ... ... ?>
  8. well the site states it might work with CLI, but i would take thorpe's word over a website with that many spelling errors and just make a wrapper:P
  9. i think u are looking for the mysql comparison statement called LIKE. here some info about it. http://www.htmlite.com/mysql011.php u can find alot more info if u google it. it basicly compare's strings and returns any if matched. your query would look something like this. $search_string = 'words to find'; $resource = mysql_query("SELECT * FROM lyrics WHERE lyric_text LIKE '%$search_string%'"); hope this helps
  10. like he said, shebang doesnt work with windows systems.
  11. the way i do it is use the predifined constant called DIRECTORY_SEPARATOR i would redefine it to something like DS to avoid having RLY long paths lol. <?php define( 'DS' , DIRECTORY_SEPARATOR ); define( 'BASE' , __FILE__ ); $fs_path_array = explode( DS, BASE ); ?> works on both unix and windows systems.
  12. u could find out the current location of the running file with $_SERVER["SCRIPT_FILENAME"], then use the explode version to put em into an array like this. $array = explode('/',$_SERVER["SCRIPT_FILENAME"]); then from there u can work to the path u want using php's array functions and then implode em back together.
  13. an option would be to have the files outside of your www root so u cannot access it directly, but only through a script that is accessible from the outside,which in turn outputs the file u need. this script could look at the machine accessing the script and denying the file if it is anyone else but your own server. maybe but not sure another option might be to restrict access with apache's mod_rewrite. although im not sure how to do this.
  14. i would suggest reading some basic php and mysql tutorials first like this one http://www.devshed.com/c/a/PHP/Website-Database-Basics-With-PHP-and-MySQL/ or this one http://phpsense.com/php/php-mysql.html
  15. why would you do that? php is a server-sides language, so unless u want your phone to act as a server u dont do php magic on it:P instead u could make a php website on a server, and make sure that whatever it outputs(usually html) is supported by the Mobile phones. this usually comes down to supporting the small screen resolution with special CSS sheet for this type's of user agents.
  16. Hi im no filesystem expert or anything but hope this answers your questions. nothing really, its what u do to them that matters. a project that i have done some maintenance on in the past, saved file images to 1 location. this directory had about 25.000 files in it and everything was still running smoothly. usually when a script try's to read the entire directory at once it slows down the operating system(the larger the directory, the longer it will take) i have even seen some scripts that did a foreach loop for every file in a directory, which will be killing for ANY webserver. bad coding or bad file/directory handling. renaming files surely will not help. As for making subdirectories will only help in situations where ur reading the content of a directory. making subdirectories will not make ur system read files faster. pretty much yeah. what he probely means is instead of reading the entire directory each time for the filenames u need, u can also store these filenames in the database. and call them when needed. accessing a database is ALOT faster then reading from disk.(saves alot of system resources,even on small scale projects.) although i dont support his idea of including the filepath in the database. as this will make u need to change every path of every file if u ever decide to move your big directory. hope this helps
  17. usually these errors consist of a non closed if statement before the actual line that seems to be bugging. try looking into your isLoggedIn() function and see if everything is closed as it should be'. if this page is included by other pages, you should check those pages for non closed if statements u can test your current code without the isLoggedIn() function by replacing the if (!isLoggedIn()) with if(TRUE) hope this helps.
  18. Hey. I do not think the users personal time will be good for this. as it will affect the script when the clock is set wrong, or when the user is in another time zone. for example: if the users clock is 5 minutes behind and they look on the website, they will see the stock market is still open, while it is not and has not been for the last 5 minutes.(same goes if u are in another timezone) why not use unix timestamp and let all the date/time checking be done server sided. u can make new timestamps on each page request(timestamp of current time), and compare them to the opening/closing timestamps of that day. if current time if higher then the opening time AND lower then closing time, display open, else display closed. <?php // $open //should have a timestamp holding opening time of today // $close //should have a timestamp holding closing time of today $current_time = time(); // this holds the current time if($current_time > $open AND $current < $close){ $stat = '<b><font color="green">Open</font></b>'; }else{ $stat = '<b><font color="red">Closed</font></b>'; } ?> there might be more efficient ways to do this, but this is the way i would do it. quicker, probely easyer, and no need to use anything other then php, plus its precise to the second. hope this helps u.
  19. meh was wrong post sry had something else in mind:P
  20. Notice: Undefined index: user_id in C:\xampp\htdocs\testsite\community\viewprofile.php on line 44 means the the user_id index from the $_GET variable is not defined. in other words your not linking to the page as you should. for example http://website.com/viewprofile.php?user_id=5 url will define the user_id $_GET variable in your script with number 5
  21. try turning error reporting on by adding this code to the top of the page ini_set('error_reporting', E_ALL); ini_set('display_errors', TRUE); and when doing the actual query you have error supressing by the @ sign $result = @mysqli_query($dbc, $q); should be this, to show what the query error is. $result = 2mysqli_query($dbc, $q); echoing the actual query that need to be run also helps to see if its working
  22. like PFMaBiSmAd and others have been saying put this code before ANY other output INCLUDING HTML!!!!! ob_start(); so the start of that html file should look like this <?php ob_start(); ?> <html> <head> <title>..~ and the end should look something like this </body> </html> <?php ob_end_flush(); ?> make sure u dont have ANY php echoing or ANY HTML code before ob_start(); or after ob_end_flush(); commands.
  23. if your running iptables.(which is most common firewall/routing tool for linux). you should be able to log all packets going through it. here's a tutorial about it. http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch14_:_Linux_Firewalls_Using_iptables
  24. already said so. should be just width not box-width. yeah i know:P just put it in there for testing reasons so i dont have to make a whole separate css file im just showing what he done wrong, with the span tags that's all, not gonna explain to him how css should be implemented.
×
×
  • 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.