getting data from other site

Ok, here is the problem: I need to get the content of a site into a string.
The site is http://voes.mfinante.ro/codfiscal/agenticod.html?cap=105421439.
In the respective form, if I put the “23667” value into the input filed, the result would be some details regarding a certain company.

Now, I’m trying to get this result in the $file variable with the following code:
[php]
$options = array(
‘http’=>array(
‘method’=>“POST”,
‘header’=>“Content-Type: application/x-www-form-urlencoded”,
‘content’=>http_build_query(array(‘cod’=>‘23667’, ‘cap’=>‘105421439’))
));
$context = stream_context_create($options);
$file=file_get_contents(“http://voes.mfinante.ro/codfiscal/codfiscal.html”, false, $context);
[/php]

Still, this code is not working. The result is an error page which seams to “know” that this is an authomatic script. Any ideea ?
Thank you !

Sponsor our Newsletter | Privacy Policy | Terms of Service