Php:提交表单并同步调用外部页面GET


Php: submit form and synchronously call external page GET

我有一个表单在我的web应用程序(php)上插入数据数据库(mongoDB)。

我必须创建一个与确认按钮相关联的脚本。这个脚本必须将页面称为mypage。

我该怎么办?

<form class="form-horizontal" id="ajax-contacts" action="" method="POST">
  something
</form>

可以从php中使用file_get_contents。

<?php
$response = file_get_contents("http://www.example.com/mypage.aspx?param1=value1&param2=value2");
?>