error when adding etology to header/footer.php

Hey guys i’m new here and to the whole php scene so im stuck on a problem…

I am trying to add etology ad code to my header.php and footer.php file but no matter where i put it i get this error… Parse error: syntax error, unexpected ‘<’ does anyone know where I should ad the code at or how I should… I been at this for 3 hrs :roll: Thanks alot…

Etology Code




include “ctracker.php”;
include “online_users.php”;
include “conf_global.php”;

<?php echo $sitename; ?> <?php //Start Ban system //Lets try connecting to mySQL @ $db = mysql_pconnect($mysql['host'], $mysql['user'], $mysql['pass'], $mysql['db']); //IT"S NOT WORKING! if (!$db) { echo "MySQL error connecting to the database. Ensure your MySQL info in conf_global.php is correct.

" . mysql_error(); die(); } //IT"S NOT WORKING! if (!mysql_select_db($mysql['db'],$db)) { echo "MySQL error connecting to the database. No database selected.

" . mysql_error(); mysql_close($db); die(); } $ban1 = mysql_query("SELECT ip FROM ban_ip"); $ban2 = mysql_num_rows($ban1); if ($ban2) { for ($ctr = 1; $ban2 = mysql_fetch_array($ban1); $ctr++) { $deny_ip[$ctr] = $ban2[ip]; } } else { $deny_ip = array(); } $_allowed = true; foreach($deny_ip as $dip) { $dip = str_replace('.','.',$dip); $dip = str_replace('*','[0-9]{1,3}',$dip); $dip = str_replace('?','[0-9]{1}',$dip); if(ereg("^{$dip}$", $_SERVER[REMOTE_ADDR])) $_allowed = false; } if(!$_allowed) { echo '

You do not have access to this page.

'; mysql_close($db); die(); } // End Ban System if(isset($javascript)) { echo $javascript; }?> <?php // // Check for the _install.php file and disable the image hosting script until it is deleted // if (!$mysql['db']) { echo ''; echo '

Please Install the MySQL database and create your conf_global.php file first!

'; include "footer.php"; echo ''; die(); }

else if ( file_exists(’_install.php’) )
echo ‘’;
echo ‘


Please delete the _install.php file before continuing.

Leaving this file on your server may pose a security issue.

include “footer.php”;
echo ‘’;

echo ‘’;



<?php include "conf_global.php"; //If the index is disabled than disable the link if ($index != 1) { echo '

Index Page'; } else { echo '

Index Page'; } //If the page is disabled than disable the link if ($reported != 1) { echo '    Reported Images'; } else { echo '    Reported Images'; } //If view_all is disabled than disable the link if ($view_all != 1) { echo '    Hosted Images'; } else { echo '    Hosted Images'; } //If uploading is disabled than disable the link if ($upload != 1) { echo '    Upload Image'; } else { echo '    Upload Image'; } echo '

Admin Login'; /* To help support us, please don't remove our copyright, please. If you do, please at least donate to us! */ echo '

All content is Copyright © '.date("Y").' and its original authors'; echo '

'; //Do not delete this line. It is a cron job used to check if images need to be deleted //Images that are not viewed in xx days are deleted automatically. Configure this in the Admin Control Panel echo ''; echo ''; echo ''; echo ''; ?>[/code]

What is the exact error message?

Parse error: syntax error, unexpected ‘<’ in /home/voxiso/public_html/includes/footer.php on line 25

And where are you trying to insert the code?

every where no matter where i add it i get very same error just with a different line number and that all depends which line is on

When adding the code, are you keeping in mind the difference between HTML (the etology code) and PHP (the footer.php code)? Coz that’s a pretty fundamental difference which could lead to the issue you’re describing.

Yeah i know they are both totally different but i only been at this type stuff for a month or two i really know next to nothing, But this is the only problem i have not been able to get around… is there anyway to get those etology ads to work that you know of?

You could have PHP echo the etology code. Be sure to escape the quotation marks in the code if you do that.

Sponsor our Newsletter | Privacy Policy | Terms of Service