title: PHP Goutte / CURL - Complete ASPX Form
body: <p>I'm trying to get data from here: <a href="https://wyobiz.wy.gov/Business/FilingSearch.aspx" rel="nofollow noreferrer">https://wyobiz.wy.gov/Business/FilingSearch.aspx</a></p>
  
  <p>I'm trying to check if business name is free or not.
  But this website is <strong>asp.net web forms</strong>, and whole website is one big form. 
  And I don't know how to get data from this form. </p>
  
  <p>I think problem is with:</p>
  
  <pre><code>        '__VIEWSTATE' =&gt; '',
          '__VIEWSTATEGENERATOR' =&gt; '9E6EC73D',
          '__EVENTVALIDATION' =&gt; '',
  </code></pre>
  
  <p>Is it possible send request and get returned data in PHP? 
  Because, this code is returning </p>
  
  <blockquote>
    <p>The current node list is empty.</p>
  </blockquote>
  
  <p>Thank you.</p>
  
  <p>My code:</p>
  
  <pre><code>    $crawler = $client-&gt;request('GET', 'https://wyobiz.wy.gov/Business/FilingSearch.aspx');
      $form = $crawler-&gt;selectButton('Search')-&gt;form();
      $formValues = $form-&gt;getValues();
      $crawler = $client-&gt;submit($form, array(
          '__VIEWSTATE' =&gt; $formValues['__VIEWSTATE'],
          '__VIEWSTATEGENERATOR' =&gt; $formValues['__VIEWSTATEGENERATOR'],
          '__EVENTVALIDATION' =&gt; $formValues['__EVENTVALIDATION'],
          'ctl00$MainContent$myScriptManager' =&gt; 'MainContent_myScriptManager',
          'ctl00$MainContent$txtFilingName' =&gt; 'Google',
          'ctl00$MainContent$searchOpt' =&gt; 'chkSearchStartWith',
          'ctl00$MainContent$txtFilingID' =&gt; null,
      ));
      $crawler-&gt;filter('body')-&gt;each(function ($node) {
          print $node-&gt;text() . "\n";
      });
  </code></pre>
  
  <hr>
  
  <p>Conclusion: Goutte <strong>SUCKS</strong> Goutte's support <strong>SUCKS</strong>!</p>