[Tool/Web/Other] Copyright Script
#1

Hey,
I notice that lots of website have outdated copyrights, and updating them seems like a hassle if you have lots of pages, so I made this copyright script using PHP that updates automatically every year.

PHP Code:
<?php $startYear "&copy; 2013 "
        
$currentYear date('Y');
        echo 
$startYear;
        if (
$startyear != $currentYear) {
            echo 
'- ' $currentYear; } ?><?php echo $company - $slogan?> All Rights Reserved.
Include that where you copyright is.

The end result looks like this:
© 2013 - 2014 Winged Hosting - The Winged Way. All Rights Reserved.

Of course, you have to define the company and slogan.

At the very top of the page, include this

PHP Code:
<?php include 'defines.php' ?>
Make a file called "defines.php" in your main directory and put this in it.

PHP Code:
<?php $company='Winged Hosting';
$slogan='The Winged Way.'?>
This is one of the best ways to make a copyright IMO, also, you can put
PHP Code:
<?php echo "$company?>
all over your website rather than your company name. That way, you only have to change it in one place rather than everywhere.
Reply
#2

<sarcasm>
10/10 i think.
</sarcasm>
Reply
#3

Ow ye, great.
Have seen many with 2012/2013 still xD
Reply
#4

Quote:
Originally Posted by Djole1337
View Post
<sarcasm>
10/10 i think.
</sarcasm>
Thanks

Quote:
Originally Posted by BodyBoardVEVO
View Post
Ow ye, great.
Have seen many with 2012/2013 still xD
Yup, I know, Im surprised, that's why I am releasing this.
Reply
#5

Don't make a website, if 365 days is not long enough to edit one number...
Reply
#6

Quote:
Originally Posted by ikey07
View Post
Don't make a website, if 365 days is not long enough to edit one number...
What if your website has 100's of pages? and you have multiple sites? It will get annoying.
Reply
#7

Depends what website structure you use, especially as its php code, keep copyright info at footer and content in pages folder and add them to website as includes.


example
url would be examplesite.com/?page=contacts


//Header

$page = $_GET['page'];

include('pages/'.$page);


//Footer where you show copyright.
Reply
#8

Quote:
Originally Posted by ikey07
View Post
Depends what website structure you use, especially as its php code, keep copyright info at footer and content in pages folder and add them to website as includes.


example
url would be examplesite.com/?page=contacts


//Header

$page = $_GET['page'];

include('pages/'.$page);


//Footer where you show copyright.
Or...
//You can include the header

<?php include 'header.php' ?>

Website Content

//And the footer

<?php include 'footer.php' ?>

So, the pages will be more dynamic, and if you change links in footer/header, you only have to do it once.

Basically, what you said, just a different method.
Reply
#9

Quote:
Originally Posted by ikey07
View Post
Depends what website structure you use, especially as its php code, keep copyright info at footer and content in pages folder and add them to website as includes.


example
url would be examplesite.com/?page=contacts


//Header

$page = $_GET['page'];

include('pages/'.$page);


//Footer where you show copyright.
That's one hell of a LFI vulnerability. OP:
PHP Code:
<?= ($start 2014) && ($now date('Y')) && $start == $now $now $start ' - ' $now?>
Reply
#10

Quote:
Originally Posted by Misiur
View Post
That's one hell of a LFI vulnerability. OP:
PHP Code:
<?= ($start 2014) && ($now date('Y')) && $start == $now $now $start ' - ' $now?>
I'm the OP, not the person you quoted.
Reply
#11

There was supposed to be a new line
Reply
#12

This is pretty cool, nice work.
Reply
#13

They have "Copyright 2010-2013" because those are the years in which the pages were edited by a person. This tells you the LAST time they were modified so that you can work out when the content transfers in to the public domain, which is something like 100 years later. Having a script automatically update them like that is misleading because the content WASN'T created the year you are claiming it was.
Reply
#14

Quote:
Originally Posted by carz0159
Посмотреть сообщение
I'm the OP, not the person you quoted.
Which is why we give credit for others work. You should probably remove it since it's vulnerable.
Reply
#15

How many people on SA:MP actually own a copyright? like 20/10000000 server owners.
Reply
#16

Quote:
Originally Posted by TheChimpJr
Посмотреть сообщение
How many people on SA:MP actually own a copyright? like 20/10000000 server owners.
You automatically have copyright on your work, you don't need to "own" a copyright.
Reply
#17

Quote:
Originally Posted by Sinner
Посмотреть сообщение
You automatically have copyright on your work, you don't need to "own" a copyright.
Just because you add copyright at the bottom of your websites don't always mean to yours. I am talking about LEGIT copyrights where you can actually take a stand for your stuff. Some people have copyrights IG, when we all known you can't copyright a SA-MP gamemode.
Reply
#18

Quote:
Originally Posted by TheChimpJr
Посмотреть сообщение
Just because you add copyright at the bottom of your websites don't always mean to yours. I am talking about LEGIT copyrights where you can actually take a stand for your stuff. Some people have copyrights IG, when we all known you can't copyright a SA-MP gamemode.
No, most people know you CAN copyright a gamemode, because that's how copyright works - at least in both England and the USA.
Reply
#19

Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)