-
Posts
1,731 -
Joined
-
Last visited
-
Days Won
5
Content Type
Profiles
Forums
Events
Everything posted by Spudinski
-
Re: Transferring Crimes? A few lines of PHP code can do this. SELECT and INSERT...
-
Re: accountsmarketing.com It is against most games T.O.S. so I don't think that website is going to get anywhere.
-
Re: Please Help With Mailbox!!! Why not ask the original creator? It is most likely to be a query that is failing, or a missing one.
-
Re: Guess the next poster Klikoka
-
Stop Auto Refreshers and multi IP logins
Spudinski replied to misterme's topic in Free Modifications
Re: Stop Auto Refreshers and multi IP logins [me=Spudinski]takes a few hours to read all that text[/me] I'm with half of what Nyna said, and going half with what misterme said. Using the built-in features that MySQL supplies to prevent a SQL flood is useful, but once the restriction kicks in, in takes a long time for other visitors of your website to be able to view your pages. But we could rule out unavailable with most good website systems, they *should* have a feature to detect whether SQL is offline, and handle visitor's accordingly. Even then, when an error handler is setup and etc, all your data is still stored in the database, so unless you have a static website with html documents all over, you will be faced with a major lack of content, and your website will have to suffer. To use PHP at this point is a rather good replacement, that wouldn't cause so much sufferance to your website or visitors. The only bad part of using PHP to handle the requests and process it, is that its slow because most people will use SQL to prevent a SQL flood. I'm sure you get my point here, I would suggest getting a mod/lib for apache, or write one yourself, that will use plain text files to store the IP addresses(also making use of ranges), and just letting apache deny and ban the request if it is detected that there is a dos/ddos attack taking place. No need for SQL, but apache will still have to suffer from the amount of requests, but it will block them, so the "sending response" proccess of a dos is bypassed(I think). -
Re: NEED HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Godfather did not ask for a reference, he asked for a script, and Tezza` supplied one. Read the original post first next time.
-
Re: wats correct "In normal cases the mySQL client interprets the ; character as the end of a SQL statement." - technikhil The ";" is called a delimiter in MySQL, mostly used when sending more than one query at the same time to the server.
-
Re: Mining V2 Converted That line should be: mysql_fetch_array($query); or $db->fetch_array($query);
-
Re: Mining V2 Converted You have to define the $db variable globally. global $ir, $c, $userid, $db;
-
[mccode] Shoutbox [$10.00] & [$15.00]
Spudinski replied to Haunted Dawg's topic in Paid Modifications
Re: Shoutbox $10 & $15 Fast, Easy and Free way: -
Re: Please help A.S.A.P Please also post what the value of the variable $cnt is, and if it refers to any other variable, please also post it. The error message means that the query supplied to the mysql_query function is invalid, and teh function mysql_result is giving an error because it has an invalid resource.
-
Re: Frustrated with Gang Banner Add I can't seem to find anything that would indicate to produce a header error. What else have you modified in the script? A GET request uses the url to send and receive data, and there are so many reasons why someone would have in a request.
-
Re: Mining V2 Converted It is fine if it calls to the user-defined function db::query or if calls to the internal function mysql_query, just as long as it has the connection identifier is globally defined for either of the functions, it will work in the same way. The MySQL script for this is fine.
-
Re: Counting (nr game) 1861
-
I bet most of you would use a php script to do this, and it would do a good job at that. But that is not the only way, you make make it happen in an instant, like Ajax fetches documents, this changes style sheets. The javascript code that is required isn't much, it is actually just a few lines, so it is a surprise to me that some developers doesn't know how to do this. The part of this that would take the longest is creating the different style sheets, that takes some time to create a good design. You need to have a default style sheet already defined in an link element, you will also need to add an id attribute to the element. <link rel="stylesheet" href="default.css" type="text/css" id="stylesheet"> Here is the javascript code, I'm not going split it up and explain what it does, it should be obvious. function changeStylesheet(location) { element = document.getElementById('stylesheet'); element.href = location; return true; } Here is a complete script that you can use to test this out, with two style sheets. <html> <head> <title>Stylesheet Switcher</title> <link rel="stylesheet" href="default.css" type="text/css" id="stylesheet"> <script type="text/javascript"> function changeStylesheet(location) { element = document.getElementById('stylesheet'); element.href = location; return true; } </script> </head> <body> <div class="text"> [b]Choose a stylesheet to load:[/b] <input type="button" onclick="changeStylesheet('default.css')" value="default.css"> <input type="button" onclick="changeStylesheet('custom.css')" value="custom.css"> </div> </p> <div class="test">Test [i]div[/i] element</div> </body> </html> body { } body { background-color: #EEE; color: #333; font-family: arial; font-size: 12px; } div.text { background-color: #CC0000; padding: 10px; border: solid 1px #FFF; color: #FFF; } div.text input { background-color: #CC0000; border: none; font-weight: bold; color: #FFF; border: dotted 1px #FFF; } div.test { background-color: #FFF; border: solid 1px #CCC; color: #666; font-weight: bold; padding: 10px; width: 50%; text-align: center; } References: http://www.w3schools.com/tags/tag_link.asp
-
This how-to will show you how to create an text counter with javascript. On many websites you will come across this little thing, it isn't of much benefit to the developer, but it helps the visitors to see how much space they have left to type. You will need to create two HTML elements for this to work, they must be as follows: An textarea element, or an input element, really just any element that has an value attribute. <textarea id="textarea" onkeypress="countTxt(this, 'counter')"></textarea> We need to add the onkeypress event to the element, this will send the parameters to our function. An span or div element, again anything with that is able to hold HTML within it(modification script to support value attributes is possible). <span id="counter">100</span> characters left. var max_length = 100; Here a variable containing the maximum length of the elment is set. function countTxt(textarea, counter_id) { Create a function called countTxt that needs two parameters, the textarea object, and counter_id which holds the id of the element we are going to use to hold the count. counter = document.getElementById(counter_id); We need to set a variable to hold the object that holds the count. length = textarea.value.length; We need the length of the textarea element, so that we can use it further on, so we just make the length of it a variable. if (length > max_length) { textarea.value = textarea.value.substring(0, max_length); } Creating an if statement to check if the length of the textarea is greater than the value of the max length variable that we set easier on. When the statement returns true, it means that the user has entered more text than we have set is allowed. Now using the substring function, we trim off all the characters that is after the last allowed character, we also write back to the textarea element in the process. else { counter.innerHTML = max_length - length; } When the above if statement returns false, the textarea element has less characters than we are allowing the user to use. We now then update the counter element which is used for displaying the amount of character let for use, to this we subtract the length of the textarea element from the maximum amount variable called max_length. (if we want to use a [/i]input[/i] element, we would use "counter.value" rather than "counter.innerHTML") return true; } Everything has been done now, so we make our function return true since we assume nothing could have gone wrong. Here is the complete script: <html> <head> <title>Counter Test</title> <script type="text/javascript"> var max_length = 100; function countTxt(textarea, counter_id) { counter = document.getElementById(counter_id); length = textarea.value.length; if (length > max_length) { textarea.value = textarea.value.substring(0, max_length); } else { counter.innerHTML = max_length - length; } return true; } </script> </head> <body> <textarea id="textarea" onkeypress="countTxt(this, 'counter')"></textarea> <span id="counter">0</span> characters left </body> </html> References: http://www.w3schools.com/jsref/jsref_length_string.asp http://www.w3schools.com/jsref/jsref_substring.asp http://www.w3schools.com/js/js_events.asp
-
Re: please help me How and where are you using it?
-
Re: please help me <?php if($ir['gender'] == 'Male') { $u = "<font color=>{$ir['username']}</font>"; $m = "[img=male.gif]"; } else if($ir['gender'] == 'Female') { $u = "<font color=>{$ir['username']}</font>"; $f = "[img=female.gif]"; } ?> Read this: http://www.php.net/manual/en/language.operators.php http://www.php.net/manual/en/language.c ... ctures.php
-
Re: IE virus wtfvs Don't use IE. IE is also known to eat up a computer's memory. But if your really serious about this, maybe try uploading the internet explorer executable to virustotal.com, see if it splits out anything. Just search for it somewhere in the WINDOWS directory.
-
Re: Counting (nr game) 1857
-
Re: Local Sever On Linux All(most) Linux's are the same when it comes to installing LAMP. If you cannot follow that basic walk trough, I suggest you play around in Linux a bit. But actually, that how-to is basically just copy and paste, and using google to resolve the errors. If you struggle while doing things, the people at ubuntuforums.org are very helpful. You learn by experience, trail and error.
-
Re: Database...Annoying! Before, as it was when you first posted for help.
-
Re: Database...Annoying! Where are you getting the $np array from, and where is it declared? It looks like a simple typo, or maybe an invalid query somewhere else. Mind posting the parts where $np is mentioned as well?
-
Re: How many lines of code do you have? I made something like this a while back, just to show off... d: But mine takes long in my directories(the big ones), so I used yours, with only one problem to it. When it goes on for a bit, at about the 6th directory, it starts to recount all the directories, here is an example: Dir: ./blah/../blah/../blah/../blah/../blah/../blah/../blah/../blah/../blah/../PPW/ ----------- Dir: ./blah/../blah/../blah/../blah/../blah/../blah/../blah/../blah/../blah/../PPW/cache/ ----------- Dir: ./blah/../blah/../blah/../blah/../blah/../blah/../blah/../blah/../blah/../PPW/net/ ----------- I don't know why this is doing this, but I had to add the following to your code to fix it(simple but works): // original statement if (is_dir($dir.$filename)) { $new_path = $dir . $filename . '/'; line_counter($new_path); } // my alteration if (is_dir($dir.$filename) && !strstr($new_path, '/../')) { $new_path = $dir . $filename . '/'; line_counter($new_path); } final tally: 1,870,155 I have allot of junk though..
-
[mccode] Customisable Merit System [$15.00]
Spudinski replied to Akash's topic in Paid Modifications
Re: Customisable Merit System ($15+) Wordpad does that some(all) of the times... Try opening the file with Wordpad first, and then copy it from there into notepad.