its my first post in forum
as i am newbie in php so i want your help friends please help me
i am trying to making login part of www.bid786.com
i am trying since 7 days but i didnt get any success so please look up my php and tell me what i do to make it successfull
here is my login php that i have created
<?php
ob_implicit_flush(1);
flush();
ob_flush();
set_time_limit(0);
error_reporting(0);
$username= $_POST['uid'];
$password= $_POST['pwd'];
$url = "http://bid786.com/home/";
$cookie = tempnam("/coki", "CURLCOOKIE");
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://bid786.com/bid/bidnow/MzA=");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookies);
//curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*"));
curl_setopt($ch, CURLOPT_HTTPHEADER, "Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryU7y9pmePNyEDuAUD");
curl_setopt( $ch, CURLOPT_USERAGENT,"User-Agent: Mozilla/7.0 (Windows NT 6.1; rv:10.0) Gecko/20100101 Firefox/9.0" );
//curl_setopt($ch, CURLOPT_POSTFIELDS, "bidnow=&pid=30&bidnow=LOGIN&$user=$username&$passa=$password&submit=login");
$html = curl_exec( $ch );
preg_match('#input type=\"button\" class=\"bid-login-btn show1\" name=\"(.*?)" style=\"margin-left:0px;\" value=\"LOGIN\"#' ,$html,$matches);
$ga=$matches[1];
echo"name is $ga";
//sleep(10);
//echo"$html";
curl_setopt($ch, CURLOPT_URL, "http://bid786.com/bid/bidnow/MzA=");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookies);
//curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*"));
curl_setopt($ch, CURLOPT_HTTPHEADER, "Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryU7y9pmePNyEDuAUD");
curl_setopt( $ch, CURLOPT_USERAGENT,"User-Agent: Mozilla/7.0 (Windows NT 6.1; rv:10.0) Gecko/20100101 Firefox/9.0" );
curl_setopt($ch, CURLOPT_POSTFIELDS, "pid=30&$ga=LOGIN&username=$username&userpassword=$password&login=Login");
$html = curl_exec( $ch );
echo"$html";
?>
i thing this site have jquary i dint have any knowledge about it so help me please