curl post php 403 forbidden

940 views Asked by At

i'm tring to post my data using POST methode and curl excute , but the result is

403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using the credentials that you supplied.

$request='';
$url='https://app.highwire.com/api/auth';
$header=array('mydata');
$con = curl_init();

    curl_setopt($con, CURLOPT_URL, $url);
    curl_setopt($con, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($con, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($con, CURLOPT_HEADER, true);
    curl_setopt($con, CURLOPT_HTTPHEADER, $header);
    curl_setopt($con, CURLOPT_POST, 1);
    curl_setopt($con, CURLOPT_POSTFIELDS, $request);
    curl_setopt($con, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($con, CURLOPT_FAILONERROR, 0);
    curl_setopt($con, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6');
    $res = curl_exec($con);
    curl_close($con);
0

There are 0 answers