/    Sign up×
Community /Pin to ProfileBookmark

Another Parse error

I get the following parse error:

[code]
Parse error: parse error in /home/www/neutrai.freeserverhost.com/datforum/view_ip_log.php on line 25
[/code]

Here is the code that the error is in:

[code=php]
<?php
include(“confirmloggedin.php”);
include(“config.cfg”);
if(explode(“(Moderator)”,$_COOKIE[“cusername”]) || explode(“(Moderator)”,$_SESSION[“cusername”])){
?>
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN”
“http://www.w3.org/TR/html4/strict.dtd”>
<html lang=”en-US”>
<head><title>View IP’s</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<style type=”text/css”><!–
@import url(“<? echo($_useCSSFile); ?>”);
–></style>
<style type=”text/css”><!–
@import url(“<? echo($_useCSSFile); ?>”);
–></style>
</head>
<style type=”text/css”><!–
@import url(“main.css”);
–></style>
</head>
<body>
<?php
if(file_exists(“ip_log”)){
echo(“<p><b>Error, missing ip_log.”.$_fTypeExtension.” data file in the “$_dbDir.” directory. Please create this blank text file and save it as ip_log.”.$_fTypeExtension.” on your server in the “.$_dbDir.” directory to continue. If you do not have access to the server, please contact the site administrator.</b>
}
<p>
<?php

$log = file_get_contents($_dbDir.”ip_log”.$_fTypeExtension);

$s = explode(“|”, $log);
$s = array_unique($s);
$val = “”;

for($j=0; $j<count($s) -1; $j++){
if(!strstr($s[$j], “|”)){ $val .= $s[$j] .”|”; }
}

$val = preg_replace(“/|{2,}/”, “|”, $val);

$fh = @fopen($_dbDir.”ip_log”.$_fTypeExtension,”w”);
@fwrite($fh,$val);
@fclose($fh);

$log = @fopen(“/ip_log”.$_fTypeExtension,”r”);
$logFile = fread($log, filesize($_dbDir.”ip_log”.$_fTypeExtension));
if($logFile != “”){
$complete = explode(“|”, $logFile);
for($ld=0; $ld<count($complete); $ld++){
$info = explode(“_”, $complete[$ld]);
if($info[0] != “” && $info[1] != “”){
echo(“Name: “. $info[0] .”<br>IP address: “. $info[1] .”<br><br>”);
}
}
} else {
echo(“No IP’s logged.”);
}
fclose($log);
?></p>
<p><a href=”index.php” title=”Go to forum index”>Return to forum index</a></p>
</body></html>
<?php
} else {header(“Location: login.php”);}
?>
[/code]

It’s a looong sucker, but I’m really having problems with it.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@Da_WarriahOct 09.2004 — You need to close your echo statement:

[code=php]echo("<p><b>Error, missing ip_log.".$_fTypeExtension." data file in the "$_dbDir." directory. Please create this blank text file and save it as ip_log.".$_fTypeExtension." on your server in the ".$_dbDir." directory to continue. If you do not have access to the server, please contact the site administrator.</b>[/code]

should be:

[code=php]echo("<p><b>Error, missing ip_log.".$_fTypeExtension." data file in the "$_dbDir." directory. Please create this blank text file and save it as ip_log.".$_fTypeExtension." on your server in the ".$_dbDir." directory to continue. If you do not have access to the server, please contact the site administrator.</b>");[/code]
Copy linkTweet thisAlerts:
@drythirstauthorOct 09.2004 — Works now! thanxxx
×

Success!

Help @drythirst spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...