summaryrefslogtreecommitdiffstats
path: root/application/Functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/Functions.php')
-rw-r--r--application/Functions.php38
1 files changed, 19 insertions, 19 deletions
diff --git a/application/Functions.php b/application/Functions.php
index ad2b147..0b89390 100644
--- a/application/Functions.php
+++ b/application/Functions.php
@@ -42,23 +42,23 @@ function print_a(){
}
function PostToHost($host, $path, $referer, $userAgent, $dataToSend) {
- $fp = @ fsockopen($host, 80);
- @ fputs($fp, "POST $path HTTP/1.1\r\n");
- @ fputs($fp, "Host: $host\r\n");
- @ fputs($fp, "User-Agent: $userAgent\r\n");
- @ fputs($fp, "Referer: $referer\r\n");
- @ fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n");
- @ fputs($fp, "Content-length: ". strlen($dataToSend) ."\r\n");
- @ fputs($fp, "Connection: close\r\n\r\n");
- @ fputs($fp, $dataToSend);
- $res = "";
- while(!@ feof($fp)) {
- $res .= utf8_encode(fgets($fp, 128));
- }
- @ fclose($fp);
-
- $res = @ explode("\r\n\r\n",$res);
- $result['http-header'] = $res[0];
- $result['http-body'] = $res[1];
- return $result;
+ $fp = @ fsockopen($host, 80);
+ @ fputs($fp, "POST $path HTTP/1.1\r\n");
+ @ fputs($fp, "Host: $host\r\n");
+ @ fputs($fp, "User-Agent: $userAgent\r\n");
+ @ fputs($fp, "Referer: $referer\r\n");
+ @ fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n");
+ @ fputs($fp, "Content-length: ". strlen($dataToSend) ."\r\n");
+ @ fputs($fp, "Connection: close\r\n\r\n");
+ @ fputs($fp, $dataToSend);
+ $res = "";
+ while(!@ feof($fp)) {
+ $res .= @ fgets($fp, 128);
+ }
+ @ fclose($fp);
+
+ $res = @ explode("\r\n\r\n",$res);
+ $result['http-header'] = $res[0];
+ $result['http-body'] = $res[1];
+ return $result;
} \ No newline at end of file