[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Prevent certain terms from displaying in dynamically generated PHP

Asked by mycarefreepc in PHP Scripting Language, Apache Web Server

Tags: php, prevent abuse

I've got the following code on my landing pages so that I can dynamically generate the keyword the searcher used to arrive on the page through my paid advertising campaigns.  (which the code works fine thanks to some help from EE).

<?php
if ($_GET['key'])
{echo htmlentities(ucwords($_GET['key']));}
else
{echo ucwords("Your Original Info Here");}
?>

Problem is, I can see this possibly being abused by some jokers who want funny screen shots as obviously I can pass any words I want to the page now.  Is it possible to blacklist certain phrases or words?  Is there an approach to this?

If someone types test.html?key=You Suck  I don't necessarily want a screen shot taken of my website saying this.  Does this make sense or am I being paranoid... ?

Thanks
[+][-]11/04/09 01:13 AM, ID: 25737565Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/04/09 01:24 AM, ID: 25737611Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/04/09 01:28 AM, ID: 25737631Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/04/09 01:52 AM, ID: 25737741Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/04/09 01:58 AM, ID: 25737770Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/06/09 06:18 PM, ID: 25764701Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/11/09 09:05 AM, ID: 25796815Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625