POST _viewstate with php
<p>Hi I'm trying to send post values using a PHP script to an external website and get the result. My code is as follows</p>

<pre><code>$postdata = http_build_query(
    array(
        'drpservice' =&gt; 091,
        'drpdirection' =&gt; 1,
        'drpbusstop' =&gt; 18051
    )
);

$opts = array('http' =&gt;
    array(
        'method'  =&gt; 'POST',
        'header'  =&gt; 'Content-type: application/x-www-form-urlencoded',
        'content' =&gt; $postdata
    )
);

$context  = stream_context_create($opts);

$result = file_get_contents($url, false, $context);

echo $result;
</code></pre>

<p>However, it won't return the required results unless I can manage to send in the hidden _VIEWSTATE value. 
Anyone able to help?</p>
