In a remote site, there is a HTML file (say http://www.example.com/abc.html), which reads:
<input id="ID1" name="NAME1" value="VALUE1">
In my PHP code in my server, I need "VALUE1" from http://www.example.com/abc.html. How can I do it using PHP?
Since the remote html is written in XHTML 1.0, I guess I could use an XML parser?
ADDED
Using xml_parse_into_struct
, I obtained an array that contains:
[15] => Array
(
[tag] => INPUT
[type] => complete
[level] => 4
[attributes] => Array
(
[TYPE] => hidden
[NAME] => NAME1
[ID] => ID1
[VALUE] => VALUE1
)
)
How can I obtain "VALUE1"? I guess now this is more a question for handling arrays in PHP. I always know the name "NAME1", but I don't know the value "VALUE1". So I want to obtain "VALUE1" using "NAME1" which is the information I know.