I have a similar error in line 1 of the following code:

<?xml version="1.0" encoding="iso-8859-1"?>
<?php
$ip = 

$_SERVER['REMOTE_ADDR'];

if (getenv(HTTP_X_FORWARDED_FOR))
{$pipaddress = getenv(HTTP_X_FORWARDED_FOR);
$ipaddress = 

getenv(REMOTE_ADDR);
}

Recommended Answers

All 2 Replies

Member Avatar for GreenDay2001

Line 3: $ip = , is be incomplete. I dont see it being used anywhere, so perhaps remove it.

The forum post changed the formatting of the code a little. Line 5 should be with line 3. But I found the problem to the syntax error. I needed to remove line 1 that was placed there by the html editor I used.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.