Hi everyone,
I have new questions for tonight.
I would like to know the best ways to prevent Denial Of Service Attacks.
Well my question is a bit more precise than that.
I can see of three vectors of implementing a DoS attack (an attacker will certainly use a combination of the 3 ...) here they are:
1. Iteration: using a program that will repeatedly make requests with GET/POST....
User Profile
Collapse
-
Limit HTTP POST request data size (DoS Attack)
-
ok Thank's a lot ! -
Thank you Dormilich!
And you are sure that it is faster than querying without limit and then calling mysql_affected_ rows() ?
If yes, how do I handle the resultset? Like with a normal query without the while?
like that?Code:$sql = "SELECT COUNT(*) AS numRows FROM ... JOIN ... GROUP ... "; $row = mysql_fetch_array($resultset)); $numRecords = $row['numRows'];
Leave a comment:
-
What happens exactly when i do a db query?
Hello i'm intrigued by what happens behind the scenes when I do a DB query to a database from php.
I would like to know what is the exact life cycle of a mysql_query()
I ask this question because i need to know what is the best solution to count the number of rows from a query.
My query is performed to fetch records from a mysqlDb that will be displayed as a list of let's say 10 rows. If i hadn't put a... -
Group_concat()
Hi,
I'm wondering how to achieve the following:
well i don't know if you guys like wine but I have to explain a very little on wine to explain my example: Wine is made from grape and a wine bottle may be made from different sorts of grape. So when you have a bottle it usually says: 10% of shyra, 50% of cabernet and 40% of merlot
meaning that the wine in the bottle was made from that percent of each grape type.... -
thanks for your answer, but the ';' is automatically appended to the query when using mysql_query() from php.
I already solved the problem.
Regards,
bilibytesLeave a comment:
-
Syntax Error ORDER BY GROUP BY
Hello, i need some help i am getting this error:
the entire query code is:Code: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 'GROUP BY w.location_id ORDER BY w.wine_id ASC' at line 1
...Code:SELECT w.wine_id AS wineId, w.name AS wineName, w.producer_id AS producerId,
-
i don't understand really well what you want to achieve.
maybe this helps you : Modified Preorder Tree Traversal
good luckLeave a comment:
-
because you have not turned error reporting on, and your code contains errors, such aswhich should be writtenCode:isSet()
lowercased.Code:isset()
As mark suggested you in a previous post, read the posting guidelines of the forum.
regardsLeave a comment:
-
-
I suggest that you go step by step.
first check that you get the data from the brower, and try to echo it.
then try to connect to the db and make a query with data you write in your file, not from $_POST
and try to output it.
and so on, you have to narrow down the search until you know where the problem comes from.
once you know where your code fails, come back and we will...Leave a comment:
-
-
-
Mark, my problem is solved!! we can close this thread!! lol
here is the explanation:
I have created a class that handles the url params.
this class is called Bb_Url_Sanitize
it uses a filter, for the moment i use Zend_Filter_Inp ut, which is good for me.
As i have created the Bb_Url_Sanitize class based on Zend_Filter_Inp ut, and i have used some of the methods of Zend_Filter_Inp ut....Leave a comment:
-
You are not doing the query well.
you should pass a mysql connection to the query so that it knows where to query.
...Code:$link = mysql_connect('hostName', 'userName', 'passWord'); //then select the db mysql_select_db('databaseName', $link); //then you can make your queries passing the $link $resultSet = mysql_query('SELECT * FROM Table1', $link); //nowLeave a comment:
-
Yes mark,
i have the interface, however the problem i had was that i didn't know how to check if the user defined class implemented my interface without forcing him to use implements.
I didn't want to force him to use implements because his class may be part of another framework such as Zend_Framework. And it's no good practice to change the code of existing classes (at least if you are not it's developer).
But then i finally...Leave a comment:
-
-
I am doing a reusable class that filters the url input. Let's call it Url_Sanitize.
Url_Sanitize uses a filter which can be of any type. The only restriction for that filter object, is to implement one interface, so that the Url_Sanitize can fearlessly (of an exception) call the filter methods that are specified in the interface.
Ok i have the solution, i think...
If the person wants to pass a filter object,...Leave a comment:
-
Thanks for your reply.
Your solution works well if i just want to check a few methods, but if i have an interface that is quite big, it will not be very efficient.
What I would like is something like this:
...Code:<?php Interface Smoker_Interface { public function lightACigar($brand); } class BobMarley { protected $_cigarInMouth; public functionLeave a comment:
-
Check if Object implements interface
Hello,
I have a little question.
I would like to know how to check if an object is compliant with an interface.
I know that if the Class implements explicitly the Interface, like this:
the operator instanceof will let me know. like this:Code:Class RobertNestaMarley implements Smoker_Interface
...Code:$bobMarley = new RobertNestaMarley() if ($bobMarley instanceof
No activity results to display
Show More
Leave a comment: