<?php

$url = 'http://www.oceanpages.com.au/all_auto_reply.php';

$kv = 2;

$query_string = "&bname=".$bname."&name=".$name."&email=".$email."&suburb=".$suburb."&phone=".$phone."&message=".$message."&con_name=".$c_name."&con_phone=".$c_phone."&website=".$website."&con_email=".$c_email;

$ch = curl_init($url);



curl_setopt($ch, CURLOPT_URL, $url);

//curl_setopt($ch, CURLOPT_POST, $kv);

curl_setopt($ch, CURLOPT_POSTFIELDS, $query_string);



curl_setopt($ch, CURLOPT_HEADER, FALSE);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, FALSE);

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);



$result = curl_exec($ch);



curl_close($ch);





/*$urltopost = "http://www.oceangroups.com.au/curl_fun.php";

    $data = array (

      "callbackcontextkey" => "7CF866FEDDD42B1529DAED8272DA83AF72EFBB896E3176EFB70CD34D02A81BF647D420A3F880C10178E804AC21CA4999",

      "selectfunction" => "SPSel1",

      "name" => "",

      "clubid" => "1600",

      "playernumber" => "",

      "gender" => "",

      "agegroupid" => "",

      "searchteam" => false,

      "agegroupcontext" => 0,

      "tournamentdate" => "",

    );                                                                   



$data_string = json_encode($data);                                                                                   



$ch = curl_init('http://www.oceangroups.com.au/curl_fun.php');                                                                      

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");                                                                     

curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);                                                                  

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                                      

curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                          

'Content-Type: application/json',                                                                                

'Content-Length: ' . strlen($data_string))                                                                       

);  

$result = curl_exec($ch);

echo $result; */

?>