jest strona załóżmy "przyklad.pl":
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <form id="form" name="qweqweasd" method="post" action=""> <label> <input type="text" name="textfield" id="textfield" size="10" value="loginx123" /> </label> <label> <input type="text" name="textfield2" id="textfield2" size="15" /> </label> <input type="hidden" name="hiddenField" id="hiddenField" value="1"/> <input type="hidden" name="hiddenField2" id="hiddenField2" value="0123"/> <label> <input type="checkbox" name="checkbox" id="checkbox" /> </label> <label> <input type="submit" name="button" id="button" value="Submit" /> </label> </form> </body> </html>
I teraz chcę zrobić skrypt, który pobierze z przyklad.pl wszystkie inputy z formularza (jest tylko jeden formularz na stronie).
Po wykonaniu skrypt powinien zwrócić array w stylu:
"textfield" = > "loginx123", "textfield2" = > "", "hiddenField" = > "1", "hiddenField2" = > "0123", "checkbox" = > "", "button" = > "Submit"
Jak zrobić taki skrypt? Może jest jakiś gotowy? Pozdro.