I have a strange question!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jasear
Forum Newbie
Posts: 4
Joined: Thu Oct 27, 2005 2:15 pm

I have a strange question!

Post by jasear »

I have an application in php encoded with zend encoder.

The problem is that it has some stuff written at the bottom of the page that i need to get rid of.

I have been thinking of various solutions but havent been able to come up with a feasible one.

Is it possible to remove that?

The output in html is:

<div class="bold">
<a href="http://www.hat.com">Powered by hat </a>
</div>

Is there a way I can put some conditional statement in PHP which will get rid of this before it is output?

Or is there no way round this at all?
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

Moved to Code

they probably don't want you to remove it by design. They want credit, as they should, for the work they put into developing the application.

you should check to the license agreement to see if you're even "allowed" to remove it...
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

assuming you're allowed to remove it why not just delete it from the code?.....
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

It's been made dificult for a reason, so you DONT do it.
User avatar
elecktricity
Forum Contributor
Posts: 128
Joined: Sun Sep 25, 2005 8:57 pm
Location: Trapped in my own little world.
Contact:

Post by elecktricity »

although there are a few ways to not display the code keeping it there here are a few:

Code: Select all

<span style="display:none">
<div class="bold">
<a href="http://www.hat.com">Powered by hat </a>
</div>
</span>

Code: Select all

<?PHP
$nodisplay = '1';
if($nodisplay == '5') {
echo '<div class="bold">';
echo '<a href="http://www.hat.com">Powered by hat </a>';
echo '</div>';
}
?>
jasear
Forum Newbie
Posts: 4
Joined: Thu Oct 27, 2005 2:15 pm

Post by jasear »

ok, I think you misunderstood my question.

The code is already encoded. All i can see is the output html when i view source after loading the page.

In the view source i see the html code i posted above.

I was wondering whether there is a way to block that from outputting.
User avatar
elecktricity
Forum Contributor
Posts: 128
Joined: Sun Sep 25, 2005 8:57 pm
Location: Trapped in my own little world.
Contact:

Post by elecktricity »

so your saying on the page it looks something like:
Powered by hat
and you dont want that there? still kinda lost at what you want if that above didnt help
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

So the encoder throws that on the bottom of every page? That sucks. If that's the case, there's nothing you can code in your PHP page that'll get rid of it. However, you may be able to write something in javascript that runs every time the page loads, which removes that bit of code.

Another option (which is ugly), is to end your file with <div style = 'display:none;'>. That may set that added extra stuff to be not displayed. Of course then you've got the problem that you've got an unclosed div at the end of your page.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

Burrito wrote:Moved to Code

they probably don't want you to remove it by design. They want credit, as they should, for the work they put into developing the application.

you should check to the license agreement to see if you're even "allowed" to remove it...
Agreed...

I hate people who steal others hard work!!! :(
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Seriously? If it is encoded then they don't want you messing with the code. Find out from the developer what it would take to have them remove that piece of output from the code. But I wouldn't mess with it unless the license says you can.
rohabrar
Forum Newbie
Posts: 6
Joined: Fri Oct 28, 2005 3:20 pm

Post by rohabrar »

I might be late commentin on this conversation --

Anyways, to the original sender - just have a look in the dircetory structure of the script you should find something similar to template or skin. As these big scripts are based on pure template system.

Now open any page in some editor and go right to the bottom of the screen -- choose view design for easy navigation and click on php code there -- hopefully (crosses finger) you will find include statement -- Bingo!! open the page in the include statement and remove the text you want to remove.

:roll: does this make sense :?:

rohabrar
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

i guess it wouldn't be that hard just to hard-code the text in the encoder :roll:
Post Reply