php - how can i place the variables of a function into this action script?
<p>i have the variables $test1 and $test2 below.. how can i get them to replace where you enter the site name below? im so frustrated.. i am using wordpress as a cms..</p>

<pre><code>    &lt;?php
$homepage = file_get_contents('http://www.macsiam.com/sites.php');


preg_match_all('%\'http://([^./]+).[^.]+\.[a-z]{2,4}\'%i', $homepage, $domains, PREG_PATTERN_ORDER);
// $domains[0] is an array of matched full URLs (http://whatever.wherever.com/page.php)
// $domains[1] is an array of matched subdomains (whatever)

$test1 = $domains[1][0];
$test2 = $domains[1][1];

echo $test1;
echo '&lt;br&gt;';
echo $test2;

?&gt;
</code></pre>

<p>to</p>

<pre><code>&lt;?php wp_nonce_field( 'add-blog', '_wpnonce_add-blog' ) ?&gt;
&lt;table class="form-table"&gt;
    &lt;tr class="form-field form-required"&gt;
      &lt;th scope="row"&gt;&lt;?php _e( 'Site Address' ) ?&gt;&lt;/th&gt;
      &lt;td&gt;
      &lt;?php if ( is_subdomain_install() ) { ?&gt;
      &lt;input name="blog[domain]" type="text" class="regular-text" title="&lt;?php _e( 'Domain' ) ?&gt;"/&gt;.&lt;?php echo preg_replace( '|^www\.|', '', $current_site-&gt;domain );?&gt;
      &lt;?php } else {
        echo $current_site-&gt;domain . $current_site-&gt;path ?&gt;&lt;input name="blog[domain]" class="regular-text" type="text" title="&lt;?php _e( 'Domain' ) ?&gt;"/&gt;
      &lt;?php }
      echo '&lt;p&gt;' . __( 'Only the characters a-z and 0-9 recommended.' ) . '&lt;/p&gt;';
      ?&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="form-field form-required"&gt;
      &lt;th scope="row"&gt;&lt;?php _e( 'Site Title' ) ?&gt;&lt;/th&gt;
      &lt;td&gt;&lt;input name="blog[title]" type="text" class="regular-text" title="&lt;?php _e( 'Title' ) ?&gt;"/&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class="form-field form-required"&gt;
        &lt;th scope="row"&gt;&lt;?php _e( 'Admin Email' ) ?&gt;&lt;/th&gt;
        &lt;td&gt;&lt;input name="blog[email]" type="text" class="regular-text" title="&lt;?php _e( 'Email' ) ?&gt;"/&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class="form-field"&gt;
        &lt;td colspan="2"&gt;&lt;?php _e( 'A new user will be created if the above email address is not in the database.' ) ?&gt;&lt;br /&gt;&lt;?php _e( 'The username and password will be mailed to this email address.' ) ?&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
    &lt;?php submit_button( __('Add Site'), 'primary', 'add-site' ); ?&gt;

&lt;form method="post" action="&lt;?php echo network_admin_url('site-new.php?action=add-site'); ?&gt;"&gt;
</code></pre>
