Browse code

version check - removed online path

Jimako authored on 2023/09/05 17:01:49
Showing 1 changed files
... ...
@@ -26,62 +26,17 @@
26 26
 if(!defined("_CHARSET")) exit( );
27 27
 
28 28
 
29
+	$currentversion = "3.5.6";
29 30
 
30 31
 	$output .= "<div id=\"pagetitle\">"._VERSIONCHECK."</div>";
31 32
 
32
-	// make sure curl is installed
33
-	if (function_exists('curl_init')) {
34
-		$output .= write_message(_RUNNINGVERSION);
35
-	   // initialize a new curl resource
36
-	   $ch = curl_init();
33
+ 
34
+	 $output .= write_message(_CURRENTVERSION. "$currentversion");
37 35
 
38
-	   // set the url to fetch
39
-	   curl_setopt($ch, CURLOPT_URL, 'http://www.efiction.org/version.txt');
40
-
41
-	   // don't give me the headers just the content
42
-	   curl_setopt($ch, CURLOPT_HEADER, 0);
43
-
44
-	   // return the value instead of printing the response to browser
45
-	   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
46
-
47
-	   // use a user agent to mimic a browser
48
-	   curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0');
49
-
50
-	   $content = curl_exec($ch);
51
-	   $currentversion = $content;
52
-				$output .= write_message(_CURRENTVERSION. "$currentversion");
53
-
54
-				if ($currentversion != $version) {
55
-				$output .= write_message (_UPDATEVERSION);
56
-				}
57
-				else $output .= write_message (_UPTODATE);
58
-
59
-	   // remember to always close the session and free all resources
60
-	   curl_close($ch);
61
-	}
62
-
63
-	else if(ini_get("allow_url_fopen")) {
64
-		$output .= write_message(_RUNNINGVERSION);
65
-
66
-		$location = fopen ("http://efiction.org/version.txt", "r");
67
-		$buffer = '';
68
-		while (!feof ($location)) {
69
-			$buffer .= fgets($location, 4096);
70
-		}
71
-		fclose ($location);
72
-
73
-		if ($buffer != '') {
74
-			$currentversion = $buffer;
75
-			$output .= write_message(_CURRENTVERSION. "$currentversion");
76
-
77
-			if ($currentversion != $version) {
78
-			$output .= write_message (_UPDATEVERSION);
79
-			}
80
-			else $output .= write_message (_UPTODATE);
81
-		}
82
-	}
83
-	else {	
84
-		$output .= write_message(_VERSIONNOTALLOWED);
36
+	if ($currentversion != $version) {
37
+	$output .= write_message (_UPDATEVERSION);
85 38
 	}
39
+	else $output .= write_message (_UPTODATE);
40
+ 
86 41
 
87 42
 ?>
88 43
\ No newline at end of file