Reputation: 1220
Referring to the following PHP code here
$data = array(
'foo' => 'foo foo foo',
'bar' => 'bar bar bar',
'baz' => 'baz baz baz'
);
The explanation for CURLOPT_POSTFIELDS
below the code in the document says that :
equivilent HTML form value for this might be something like <input type='hidden' name='foo' value='foo foo foo' />
1)How did the person who explained the code in the document figured out that the type was hidden
in its HTML equivalent?
2)What if I have to use type = header
, then how would the PHP code would look like?
Upvotes: 0
Views: 44
Reputation: 5213
You can figure out form elements of a remote page by downloading it and parsing it using an HTML parser like this : http://simplehtmldom.sourceforge.net/
Or you could simple view source and forge your script accordingly.
Upvotes: 1