Saturday, April 30, 2011

Ranger 20 Sailboat Sale

MySQL data with PHP Sending Authentication



you can build in PHP script to mimic the sending of data through forms that use the POST method using the headers necessary to get the browser recognizes the request. For example:
/ / Full data to be sent. $ content [] = "x = $ x"; $ content [] = "y = $ y";
$ content [] = "z = $ z";

$ content = implode ("&",$ content);
$ logitud = strlen ($ content);

$ request .= "POST / page . php HTTP/1.1 \\ r \\ n ";
 $ request .=" Host: xservidor.com \\ r \\ n "; 
$ request .=" Content-Type: application / x-www-form-urlencoded \\ r \\ n ";
$ request .=" Content-Length: $ logitud \\ r \\ n ";
$ request .=" Connection close \\ r \\ n ";
$ request .=" \\ r \\ n ";
$ request .= $ content;

if ($ handle = fsockopen ("servidor.com" 80)) {

fputs ($ handle, $ request);

while (! Feof ($ handle)) {$ response .= fgets
($ handle, 1024);


} fclose ($ handler);
}




With this script we test our forms or could be used for mass data entry. But to attack our sites so we should use a captcha to prevent these attacks.





0 comments:

Post a Comment