I have recently done this by passing value=‘Hello World’ as GET parameter to curl(). I am using a tablet at the moment and when back on my computer will paste the source.
I’m not a 100% certain I understood your question, but here’s a try:
// Get all <input ...> fields
$inputs = $dom->getElementsByTagName('input');
// value found for input
$val="";
// for each input nodes
foreach ($inputs as $input) {
// if the input nodes has an attribute named "linh"
if ($input->getAttribute('name') == 'linh') {
//get the value of the attribute "value" into the variable $val
$val = $input->getAttribute('value');
break;
}
}
echo "value found=" . $val;
I didn’t test the code but it should be near the solution. If you can change the HTML that your read, you could add an “id” to the input element, it would make this easier because you could use $dom->getElementById(‘’);