\n"; return; } fputs($fp, "$method $path HTTP/1.1\r\n"); fputs($fp, "Host: $host\r\n"); fputs($fp,"Content-type: application/x-www-form-urlencoded\r\n"); fputs($fp, "Content-length: " . strlen($data) . "\r\n"); if ($useragent) { fputs($fp, "User-Agent: MSIE\r\n"); } fputs($fp, "Connection: close\r\n\r\n"); if ($method == 'POST') { fputs($fp, $data); } // while (!feof($fp)) { // $buf .= fgets($fp,128); // } fclose($fp); return $buf; } if(0) { // init curl handle $formvars = "list_id=516&name=firstname+lastname&email=kd1233@here.com"; sendToHost("www.commandlkp.com",'get','/joinlist.php',$formvars); } #$SHOW_QUERY=1; $fields=array("firstname","lastname","email","email2","passwd","passwd2","url_desc","url","url_title","category","category2","pID"); $ref_name = getenv("QUERY_STRING") or $ref_name=$_COOKIE["REFERER"]; if ($ref_name) $rID = get_memberid($ref_name); if (!$page_title) { $page_title = "SIGNUP"; $memberID = ""; } $errmsg = ""; $action = $_REQUEST["action"]; if ($action == "1") { #open action is 1 foreach ($fields as $field) { $temp = $_REQUEST["$field"]; ## For some reason if you trim an array (ie trim($array)) ## it returns a scalar if (!preg_match("/cat/",$field)) { $temp = trim($temp); } ${$field} =$temp; } if ($memberID) { $query = "SELECT promote_url_idx FROM promote_url WHERE member_idx= '$memberID' AND ai_flag !='O' AND url='$url' AND promote_url_idx != '$pID' "; if (getOne($query)) $errmsg .="You have already selected this URL
"; } $query = "SELECT member_idx FROM member WHERE email= '$email'"; if (getOne($query)) $errmsg .="You have already registered with this email address. We only allow 1 account per email address.
"; if (!$firstname) $errmsg .= "Firstname is required!
"; if (!$lastname) $errmsg .= "Lastname is required!
"; if (!$email or !$email2 or $email != $email2) $errmsg .= "Both email addresses are required and must be the same!
"; if (!$passwd or !$passwd2 or $passwd != $passwd2) $errmsg .= "Both passwords are required and must be the same!
"; if (count($category) < 1) $errmsg.="You must select at least 1 category of intrest.
"; if (!$url) $errmsg .= "URL is required
"; //if (!fsockopen($url,80,$errno,$errstr,10)) $errmsg .= "URL $url is not valid"; if (!$url_title) $errmsg .= "URL title is required
"; if (!$url_desc) $errmsg .= "Description is required
"; if (count($category2) < 1) $errmsg.="You must select at least 1 category for your URL.
"; $bad_title = nonocheck($url_title); $bad_desc = nonocheck($url_desc); if(preg_match("/trendcomputersllc/",$url)) { $errmsg .= "URL is banned!
"; } if ($bad_title) $errmsg .= "Title:$bad_title:".get_content_text("nonoresponse")."
"; if ($bad_desc) $errmsg .= "Description: ".get_content_text("nonoresponse")."
"; if (!$errmsg) { #open if no error $cats =":"; for ($ct=0;$ct>'","'<>'","'<>'","'<>'","'<>'"); $replace=array("$username","$passwd","$surf_url","$aff_link","$firstname"); $email_body=preg_replace($search, $replace,get_content_text("signupbody")); send_mail($email,get_address("fromaddress"),get_content_text("signupsubject"),$email_body); if ($rID) give_to_referer($rID,get_content_text("refcredit")); // init curl handle $formvars = "list_id=516&name=" . urlencode($firstname) . "+" . urlencode($lastname) . "&email=" . urlencode($email); //sendToHost("www.commandlkp.com",'get','/joinlist.php',$formvars); /* $ch = curl_init("http://www.commandlkp.com/joinlist.php"); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $formvars); // perform post $rr=curl_exec($ch); //echo $rr; curl_close($ch); */ } $query = "SELECT promote_url_idx FROM promote_url WHERE member_idx= '$memberID' AND ai_flag !='O' ORDER BY promote_url_idx LIMIT 0,1"; $puID = getOne($query); if ($puID) { $update = "UPDATE promote_url SET url='$url', url_title='$url_title', url_desc='$url_desc', url_categories='$cats2' WHERE promote_url_idx='$puID' AND member_idx='$memberID'"; my_query($update); } else { $insert = "INSERT INTO promote_url(member_idx,url, url_title, url_desc, url_categories,createdate,ai_flag) VALUES ('$memberID','$url','$url_title','$url_desc','$cats2',NOW(),'A')"; my_insert($insert); } header ("Location:/member.html"); } #close if no error } #close action is 1 else { foreach ($fields as $field) { ${$field} = ""; } } if ($memberID) { #open with memberID $query = "SELECT firstname, lastname, passwd, email, categories, url, url_title, url_desc, url_categories,promote_url_idx FROM member m LEFT JOIN promote_url p ON m.member_idx=p.member_idx AND p.ai_flag = 'A' WHERE m.member_idx='$memberID' ORDER BY p.promote_url_idx LIMIT 0,1"; $rec = getOneRec($query); $firstname = $rec[0]; $lastname = $rec[1]; $passwd = $rec[2]; $passwd2 = $passwd; $email = $rec[3]; $email2 = $email; $all_cats=$rec[4]; $url = $rec[5]; $url_title = $rec[6]; $url_desc = $rec[7]; $promote_cats = $rec[8]; $pID = $rec[9]; } #close with memberID $template = "header"; require("$template_dir/template.html"); function http_post($server, $port, $url, $vars) { // example: // http_post( // "www.fat.com", // 80, // "/weightloss.pl", // array("name" => "obese bob", "age" => "20") // ); $user_agent = "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)"; $urlencoded = ""; while (list($key,$value) = each($vars)) $urlencoded.= urlencode($key) . "=" . urlencode($value) . "&"; $urlencoded = substr($urlencoded,0,-1); $content_length = strlen($urlencoded); $headers = "POST $url HTTP/1.1 Accept: */* Accept-Language: en-au Content-Type: application/x-www-form-urlencoded User-Agent: $user_agent Host: $server Connection: Keep-Alive Cache-Control: no-cache Content-Length: $content_length "; $fp = fsockopen($server, $port, $errno, $errstr); if (!$fp) { return false; } fputs($fp, $headers); fputs($fp, $urlencoded); $ret = ""; #while (!feof($fp)) # $ret.= fgets($fp, 1024); fclose($fp); return $ret; } ?>


You had some errors



First Name:
Last Name:
Email Address:
Verify Email:
Select Password:
(Must be 4-16 letters
Verify Password:
and/or numbers only)
 
Please select the type of website(s) you're interested in:
"; else print "\n \n"; } if (!is_even($ct)) print "\n \n"; ?>
\n $cb$cb
 
 
Enter the URL of a page/site you want to promote:
No adult content or sites that break out of frames.
Do not enter the Http:// Part of you URL!
http://
(You can enter more later if you have more than one!)
 
Title of the page/site listed above: (Up to 40 characters)
You may NOT use "!" in your title or description.
 
Description of the page/site listed above: (Up to 255 characters)

characters left
 
Select 1 or more appropriate categories for YOUR page/site: (For the best response, select only highly relevant categories!)
"; else print "\n \n"; } if (!is_even($ct)) print "\n \n"; ?>
\n $cb$cb
 
 
I have read and accept these Terms of Service .

I understand that "adult" sites are strictly prohibited, my URL must NOT break out of frames, and that I may not use any type of "rotator" or other automated system to abuse the system in any way.

 
>