I am writing a script that needs to scan a page and then parse the page and pull out the "to be" post values.
Example of a pulled page:
Code: Select all
<html><head><title>website!</title>
<body>
<form method="post" action="page2.php">
<input type="hidden" name="name1" value="value1" />
<input type="hidden" name="name2" value="value2" />
<input type="hidden" name="name3" value="value3" />
<input type="hidden" name="name4" value="value4" />
<input type="hidden" name="daksjdfha-adfad_2sdlkjfa8weerDFAedf" value="<center>some text here<br /><a href="http://www.somesite.com/page.php"><img src="someimage.jpg" /></a></center>" />
<input type="submit" name="submit value="Let's Go!" />
</form>
</body><html>
explode the entire page at every "<input"
then, for each piece of the page we go for the eregi function to find
Code: Select all
name="[something]"Code: Select all
value="[something]"So here is where I am at. I am using this:
Code: Select all
eregi('value="([a-zA-Z0-9_@\-\_\/\.\+^<^>:=\s]){0,255}"',$value,$val);Code: Select all
<input type="hidden" name="daksjdfha-adfad_2sdlkjfa8weerDFAedf" value="<center>some text here<br /><a href="http://www.somesite.com/page.php"><img src="someimage.jpg" /></a></center>" />
I can get the name just fine, but I can not get the value.
So I need to know the Regular Expression Pattern, in place of what I am already using:
Code: Select all
value="([a-zA-Z0-9_@\-\_\/\.\+^<^>:=\s]){0,255}"I should add that everything else comes back fine. I get all the info from all the other fields and everything, but this one just wont work. I have been searching for the answer to this for almost a month now and it is killing me!
Any help would be appreciated, Thank You!!