0byt3m1n1
Path:
/
home1
/
aserty
/
www
/
qct
/
[
Home
]
File: installstr.php
<?php $location = 'http://'.$_SERVER['HTTP_HOST']; $location .= rtrim(dirname($_SERVER["SCRIPT_NAME"]), '/'); $location .= '/'; // echo 'location: '.$location.'<br>'; $username = isset($_POST['username']) ? htmlspecialchars($_POST['username']) : 'YourUserName'; $password = isset($_POST['password']) ? htmlspecialchars($_POST['password']) : 'YourPassword'; $location .= 'RecordPHPBayClicks.php'; $str = <<<EOD // BEGIN SEND to ClickThrusPHPBay database \$recordurl = '$location'; \$QCTUsername = '$username'; \$QCTPassword = '$password'; if ( isset(\$_SERVER['HTTP_HOST']) ) { \$thehost = strtolower(str_replace('http://','',\$_SERVER['HTTP_HOST'])); \$thehost = str_replace('www.','',\$thehost); } else { \$thehost = ''; } \$ip = isset(\$_SERVER['REMOTE_ADDR']) ? \$_SERVER['REMOTE_ADDR'] : ''; \$useragent = isset(\$_SERVER['HTTP_USER_AGENT']) ? \$_SERVER['HTTP_USER_AGENT'] : ''; \$thedbreferer = isset(\$_SERVER['HTTP_REFERER']) ? \$_SERVER['HTTP_REFERER'] : ''; if(isset(\$ktv["title"])) { \$thecountry = isset(\$rover["abbr"]) ? \$rover["abbr"] : ''; \$theitemtitle = isset(\$ktv["title"]) ? \$ktv["title"] : ''; \$fields = array( 'Site'=>urlencode(\$thehost), 'CampID'=>urlencode(\$ktv["pid"]), 'CustomID'=>urlencode(\$ktv["cid"]), 'ItemNum'=>urlencode(\$ktv["item"]), 'IP'=>urlencode(\$ip), 'Referer'=>urlencode(\$thedbreferer), 'UserAgent'=>urlencode(\$useragent), 'theurl'=>urlencode(\$url), 'thecountry'=>urlencode(\$thecountry), 'theitemtitle'=>urlencode(\$theitemtitle), ); } else { \$thecountry = \$pb_request["country"]; \$theitemtitle = \$pb_request["title"]; \$fields = array( 'Site'=>urlencode(\$thehost), 'CampID'=>urlencode(\$pb_request["campaignid"]), 'CustomID'=>urlencode(\$pb_request["customid"]), 'ItemNum'=>urlencode(\$pb_request["item"]), 'IP'=>urlencode(\$ip), 'Referer'=>urlencode(\$thedbreferer), 'UserAgent'=>urlencode(\$useragent), 'theurl'=>urlencode(\$url), 'thecountry'=>urlencode(\$thecountry), 'theitemtitle'=>urlencode(\$theitemtitle), ); } \$fields_string = array(); foreach(\$fields as \$key=>\$value) { \$fields_string[] = \$key.'='.\$value; } \$fields_string = implode('&',\$fields_string); \$ch = curl_init(); curl_setopt(\$ch,CURLOPT_URL,\$recordurl); if ( strlen(\$QCTUsername) > 0 && strlen(\$QCTPassword) > 0 ) { curl_setopt(\$ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt(\$ch, CURLOPT_USERPWD, "\$QCTUsername:\$QCTPassword"); } curl_setopt(\$ch,CURLOPT_POST,count(\$fields)); curl_setopt(\$ch,CURLOPT_POSTFIELDS,\$fields_string); \$result = curl_exec(\$ch); curl_close(\$ch); // END SEND to ClickThrusPHPBay database EOD; $str = htmlspecialchars($str); echo '<textarea style="width:750px; height:500px; padding:4px; font-size:14px !important;">'; echo $str; echo '</textarea>'; ?>