Unstoppable Domains — Get your daily AI drops report

Help!!!

SpaceshipSpaceship
Watch
Impact
0
alright i just got a new host and domain name. i uploaded my site which "should" be in perfect online format. i created the site and put it in the right format yadda yadda yadda a long time ago. anyways now i'm getting some code or a comment at the top of the page. but i don't know where it's coming from. it's not in the index page.

help! where could it be coming from???!! i need to know to get rid of it.

this is the crap at the top:
// now place the new tag into the content $x=str_replace($original,$new_tag,$x); $i++; } return $x; } ?> } ?> ?>


here's the site/page that i'm referring to: www.deweydesigns.com

need to get this off asap



---edit---

alright when viewing the page source from within the browser i find it at the bottom. however. it's not in the file that i uploaded. what's the deal? somehow it's getting added.
here's what it looks like before it's uploaded:

</div>

</body>
</html>

<?php
include_once 'replacePngTags.php';
echo replacePngTags(ob_get_clean());
?>
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
download the file and check if its there. Then come back
 
0
•••
ok, the one i downloaded has a duplicate of the end like this:

</div>

</body>
</html>

<?php
include_once 'replacePngTags.php';
echo replacePngTags(ob_get_clean());
?> </html>

<?php
include_once 'replacePngTags.php';
echo replacePngTags(ob_get_clean());
?>
?>
 
0
•••
Just delete this from your file and you should be golden. But keep a backup of the original just in case!

Delete everything between these lines:
__________________

// now place the new tag into the content
$x=str_replace($original,$new_tag,$x);
$i++;
}
return $x;
}
?>
}
?>
</html>


?>
 
0
•••
Looks like you probably haven't closed some PHP tags. Something similar appears on each page.
 
0
•••
Your problem is what was mentioned above you are not closing your tags which is resulting in the code being interpreted into regular everyday text. If you need help man just let me know and I will try to fix the problem for you..for free of course :)
 
0
•••
gene... i can't delete that, because it's only there on the server.



i don't have any un-closed tags. : ( you see, i used these same files on a previous free host. i got everything exactly the way i wanted it to work online. then saved it ALL in a folder called "site in online format". now when i uploaded it all up to my new paid host does it have this problem. could the answer be in there somewhere?


-----edit-----

okay in order to use png24 i searched the web and found a way using php. anyways... the code it's adding at the top of the page is from the bottom of my png php page. here is ALL of the code for that page. unfortunately i don't see any unclosed tags here either.

Code:
<?php
/*
*   replacePngTags - Justin Koivisto [W.A. Fisher Interactive] 7/1/2003 10:45AM
*   Modified: 8/4/2004 4:57PM
*
*   Modifies IMG and INPUT tags for MSIE5+ browsers to ensure that PNG-24
*   transparencies are displayed correctly.  Replaces original SRC attribute
*   with a transparent GIF file (spacer.png) that is located in the same
*   directory as the orignal image, and adds the STYLE attribute needed to for
*   the browser. (Matching is case-insensitive. However, the width attribute
*   should come before height.
*
*   Also replaces code for PNG images specified as backgrounds via:
*   background-image: url('image.png'); When using PNG images in the background,
*   there is no need to use a spacer.png image. (Only supports inline CSS at
*   this point.)
*
*   @param  $x  String containing the content to search and replace in.
*   @param  $img_path   The path to the directory with the spacer image relative to
*                       the DOCUMENT_ROOT. If none os supplied, the spacer.png image
*                       should be in the same directory as PNG-24 image. When supplying
*                       a path, be sure it ends with a '/'.
*   @param  $sizeMeth   String containing the sizingMethod to be used in the
*                       Microsoft.AlphaImageLoader call. Possible values are:
*                       crop - Clips the image to fit the dimensions of the object.
*                       image - Enlarges or reduces the border of the object to fit
*                               the dimensions of the image.
*                       scale - Default. Stretches or shrinks the image to fill the borders
*                               of the object.
*   @result Returns the modified string.
*/
function replacePngTags($x,$img_path='bank/spacer.png/',$sizeMeth='scale'){
    $arr2=array();
    // make sure that we are only replacing for the Windows versions of Internet
    // Explorer 5+
    $msie='/msie\s(5\.[5-9]|[6-9]\.[0-9]*).*(win)/i';
    if( !isset($_SERVER['HTTP_USER_AGENT']) ||
        !preg_match($msie,$_SERVER['HTTP_USER_AGENT']) ||
        preg_match('/opera/i',$_SERVER['HTTP_USER_AGENT']))
        return $x;

    // find all the png images in backgrounds
    preg_match_all('/background-image:\s*url\(\'(.*\.png)\'\);/Uis',$x,$background);
    for($i=0;$i<count($background[0]);$i++){
        // simply replace:
        //  "background-image: url('image.png');"
        // with:
        //  "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
        //      enabled=true, sizingMethod=scale src='image.png');"
        // haven't tested to see if background-repeat styles work...
        $x=str_replace($background[0][$i],'filter:progid:DXImageTransform.'.
                'Microsoft.AlphaImageLoader(enabled=true, sizingMethod='.$sizeMeth.
                ' src=\''.$background[1][$i].'\');',$x);
    }

    // OK, time to find all the IMG tags with ".png" in them
    $pattern='/<(input|img)[^>]*src=(\\\'|\\")([^>]*\.png)\2[^>]*>/i';
    preg_match_all($pattern,$x,$images);
    for($num_images=0;$num_images<count($images[0]);$num_images++){
        $original=$images[0][$num_images];
        $quote=$images[2][$num_images];
        $atts=''; $width=0; $height=0; $modified=$original;

        // If the size is defined by styles, find them
        preg_match_all(
            '/style=(\\\'|\\").*(\s?width:\s?([0-9]+(px|%));).*'.
            '(\s?height:\s?([0-9]+(px|%));).*\\1/Ui',
            $images[0][$num_images],$arr2);
        if(is_array($arr2) && count($arr2[0])){
            // size was defined by styles, get values
            $width=$arr2[3][0];
            $height=$arr2[6][0];

            // remove the width and height from the style
            $stripper=str_replace(' ','\s','/('.$arr2[2][0].'|'.$arr2[5][0].')/');
            // Also remove any empty style tags
            $modified=preg_replace(
                '`style='.$arr2[1][0].$arr2[1][0].'`i',
                '',
                preg_replace($stripper,'',$modified));
        }

        // size was not defined by styles, get values from attributes
        preg_match_all('/width=(\\\'|\\")?([0-9%]+)\\1/i',$images[0][$num_images],$arr2);
        if(is_array($arr2) && count($arr2[0])){
            $width=$arr2[2][0];
            if(is_numeric($width))
                $width.='px';

            // remove this from the tag
            $modified=str_replace($arr2[0][0],'',$modified);
        }
        preg_match_all('/height=(\\\'|\\")?([0-9%]+)\\1?/i',$images[0][$num_images],$arr2);
        if(is_array($arr2) && count($arr2[0])){
            $height=$arr2[2][0];
            if(is_numeric($height))
                $height.='px';

            // remove this from the tag
            $modified=str_replace($arr2[0][0],'',$modified);
        }
        
        preg_match_all('/src=(\\\'|\\")([^\"]+\.png)\\1/i',$images[0][$num_images],$arr2);
        if(isset($arr2[2][0]) && !empty($arr2[1][0]))
            $image=$arr2[2][0];
        else
            $image=NULL;

        if(empty($img_path)){
            // We do this so that we can put our spacer.png image in the same
            // directory as the image - if a path wasn't passed to the function
            $tmp=split('[\\/]',$image);
            $this_img=array_pop($tmp);
            $img_path=join('/',$tmp);
            if(strlen($img_path)) $img_path.='/';
        }

        // make sure we are working with URIs, not URLs
        $imageuri=preg_replace('`^http://[^/]+`i','',$image);
        // new code for checking the actual image size
        if(file_exists($_SERVER['DOCUMENT_ROOT'].$imageuri)){
            $size=getimagesize($_SERVER['DOCUMENT_ROOT'].$imageuri);
            $width=$size[0].'px';
            $height=$size[1].'px';
        }

        // end quote is already supplied by originial src attribute
        $replace_src_with=$img_path.'spacer.png'.$quote.' style="width: '.$width.
            '; height: '.$height.'; filter: progid:DXImageTransform.'.
            'Microsoft.AlphaImageLoader(src=\''.$image.'\', sizingMethod='.
            $sizeMeth.');"';

        // now create the new tag from the old
        $new_tag=str_replace($image.$quote,$replace_src_with,
            str_replace('  ',' ',$modified));
        // now place the new tag into the content
        $x=str_replace($original,$new_tag,$x);
        $i++;
    }
    return $x;
}
?>




-----edit-------
ok this is really wierd, but i got it fixed. lol. for some reason this new server doesn't like ANY space at the end of a document. so after removing an extra line after the last </html> or ?> it wouldn't display any code at the top of the pages. all pages are now fixed. heh. thanks all.

now that that is done. i have another problem. if you guys can help me with this i will be so happy. here's the story:

i spent a long time getting everything right with css. getting everything cool in all browsers. and everything was cool finally. but one day, when i guess i was making it cross-browser compatible using different styles and php to detect the browser, it added a freaking horizontal scroll bar in my content area!!! aaahhhh!!! lol, ever since then (last fall) i have been unable to get rid of it. i have no idea why its doing this. it should be right with the specified area.

can anyone help?
 
Last edited:
0
•••
That's just a PHP function. You will need to look at all the files to find the problem. Perhaps it is a problem with the function, but without the rest of the code and input it's impossible to say.

To disable the scroll bar add this to your style sheet
overflow-x: hidden;
overflow-y: auto;
 
0
•••
thank you but i am already using overflow... that's whats so wierd. it didn't always do this. some how when i was making it cross-browser compliant it appeared. ;|
 
0
•••
Do you have a copy of the old files you could compare it against?
When I add that overflow code to navigator.css the horizontal bar disappea
 
0
•••
no, i don't think i have a copy of 'those' old files. that would have been a very long time ago. like last august or something. :(

but i tried defining x and y seperately like u suggested and both the scrollbars dissappear now and the text goes out of the defined area. i need it to be in that box. so that will not work. any other ideas though?
 
0
•••
maybe it has something to do with your host...try to upload something on geocities and they also add something on your source code...what you should do is to inquire directly to them...
 
0
•••
i dont see it?
 
0
•••
Appraise.net

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back