$v ) { $postData .= $k . '=' . $v . '&'; } $postData = rtrim( $postData, '&' ); $ch = curl_init(); curl_setopt( $ch, CURLOPT_URL, $url ); curl_setopt( $ch, CURLOPT_COOKIE, "ref=22138"); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); curl_setopt( $ch, CURLOPT_HEADER, true ); curl_setopt( $ch, CURLOPT_POST, count( $postData ) ); curl_setopt( $ch, CURLOPT_POSTFIELDS, $postData ); $output = curl_exec( $ch ); curl_close( $ch ); return $output; } $url = "https://simplemining.biz/register.php?ref=22138"; $data = array('email' => 'nowekonta@gmail.com', 'pass' => 'dobre123123', 'pass2' => 'dobre123123', 'register' => ''); api($url, $data); ?>