Oddworld Forums

Oddworld Forums (http://www.oddworldforums.net/index.php)
-   Forum Suggestions & Help (http://www.oddworldforums.net/forumdisplay.php?f=15)
-   -   Bandwidth Leeching (http://www.oddworldforums.net/showthread.php?t=9585)

Codek 01-29-2004 01:22 PM

Bandwidth Leeching
 
I seem to remember we had a problem with this before the forums moved.

To prevent this from happening again, I suggest you use the following script:

:

<_?

$from = getenv("HTTP_REFERER");

if ($from != "http://www.yoursite.com/validpage.htm")

{print(" Sorry you have tried to link to a page which does not accept visitors directly. <_br>
<_a href=http://www.yoursite.com/validpage.htm>CLICK HERE to enter");

exit;}

?>
<_/body>
<_/html>
Obviously you'll need to configure it to work for OWF, and you'll need to remove all the underscores. But it should make it impossible for visitors to arrive from invalid URLs - which stops people from leeching your bandwidth and using your mailer.

Joshy 01-29-2004 10:26 PM

Eh WTF??? I'm a computer idiot so can you please explain more clearly?

oddguy 01-30-2004 07:26 AM

I think Death's message is meant for Alcar or Abe Babe. Don't worry about it, Joshy. :fuzwink:

-oddguy :fuzcool:

Wil 01-30-2004 09:45 AM

Maybe so, but people are likely to be interested in the well being of the Forums. I know I'm slightly intrugued.

oddguy 01-30-2004 09:48 AM

I'm intrugued as well, but that code looks like somewhat giberish to me. I know basic HTML.

-oddguy :fuzcool:

Al the Vykker 01-30-2004 10:44 AM

Yeah I know HTML and such, but this scripts new to me.

Codek 01-30-2004 10:45 AM

:

I'm intrugued as well, but that code looks like somewhat giberish to me. I know basic HTML.

-oddguy :fuzcool:

It's php. php works like this:

You have your html page.

Inside it are php variables.

The variables are toggled by you.

Toggling the variables sets up the page ready to send data.

Clicking on "Go" sends this data to a server.

The server sends it through PHP to be "parsed" and "processed".

After processing the data, a new html page is generated with the variables you requested.

This happens when you post a new thread, post a new post, change your user cp options, do a search, or even send a pm.

Sending a pm is interesting though, because in most forums, it sends both your inbox, and the recipiants inbox for processing. It takes the message you made in your inbox, and moves that to the recipiants inbox, as though the content was there all along. It doesn't work quite like an email, where the whole message is sent down a pipeline. It's rather more like posting in one thread, but having the post appear in another. Weird huh? :)

oddguy 01-30-2004 11:36 AM

Very interesting. And you're saying that the above code will stop zee forums from running into the problem we had last time, right?

-oddguy :fuzcool:

Al the Vykker 01-30-2004 12:38 PM

:

Very interesting. And you're saying that the above code will stop zee forums from running into the problem we had last time, right?

-oddguy :fuzcool:

It will probably stop any future problems, but of course there is I'm assuming a way for someone to get around that. Just guessing though.

Wil 01-31-2004 01:21 AM

Thanks for the php explanation, Death. I must say I've tried to learn it several times, but never been able to wrap my head around the grammar or syntax, and such. However, the Forums can do with any help you can provide.

Codek 01-31-2004 11:52 AM

:

Thanks for the php explanation, Death. I must say I've tried to learn it several times, but never been able to wrap my head around the grammar or syntax, and such. However, the Forums can do with any help you can provide.

Well yes, PHP is very baffling. It's not something you learn and then start doing in notepad. It's increadibly long winded, no matter how simply it's put. It really is something for people who run servers. You need Apache, MySQL, and PHP installed on your computer, and you need to know how to configure each one.

The problem is, all the people that write php tutorials are ubergeeks anyway. They "assume" you already know programming languages (which is a bit stupid) and as a result, they speak all the jargon. Jargon which they fail to explain. So usually after the first paragraph it gets enormously complicated.

Which is why people who know php usually act as if they are something really special. They like talking jargon that nobody else understands, because it makes them feel big. (trust me, I've been there)

It's also the reason why people who know php are considered very valuable. You shouldn't feel stupid because you don't know php.

Alcar 02-14-2004 05:19 PM

The problem with that script is, that it cannot be used effectively. It could be placed in PHP scripts, but the PHP scripts we use are scipts that we want outside guests to be able to access. As for attachments and guests, we could actually just turn off guest attachment viewing.

Though I'm baffled as to why there are underscores in your PHP code.

Alcar...

Codek 02-15-2004 01:19 PM

:

Though I'm baffled as to why there are underscores in your PHP code.

Alcar...

There are underscores there to keep the script from embedding itself withing the page source. I wanted the script to show up in the post. To get the proper script you just remove the underscores...

Alcar 02-15-2004 07:37 PM

You could have just used the CODE, HTML or PHP vBulletin BBCode Tags. But yes, I understand why, seeing as you'd put it in a QUOTE tag.

Alcar...