You are here: Re: Error 444 Script or Action Blocked « PHP Programming Language « IT news, forums, messages
Re: Error 444 Script or Action Blocked

Posted by Jerry Stuckle on 01/20/34 11:46

Jason wrote:
> This is a new one for me, and I couldn't find anything about it online.
> So after wasting 4 hours of rewrites, I'm afraid that I have to beg the
> gurus for help!
>
> This is a relatively simple script. It takes a variable from the
> header, and compares it to a tab-delimited flat-text database. Once it
> finds a match, it uses the other info in the database to show a dynamic
> page.
>
> For instance, go to:
>
> http://www.wilkessmartstart.com/providers/
>
> These are all in the order by which they are in the database. Scroll
> down to "Diane Benesh Day Care Home," and click on the title to be
> taken to a view.php page. This is where you'll see the error, but it
> only happens with this one; all of the other names seem OK.
>
> Has anyone seen this one before, or have any idea what it means?
>
> TIA,
>
> Jason
>
>
> The only real PHP code in the script is as follows:
>
> // if there's no variable, send them to the intro page
> if (!$_GET['id']) header("Location: index.php?error=true");
>
> else {
> $found = FALSE;
>
> // if a single quote was in the name, PHP placed a \ in front
> //of it by default
> $_GET['id'] = str_replace("\'", "'", $_GET['id']);
> }
>
> // get database info
> $providers = FILE("$basepath/providers.xls");
>
> foreach ($providers as $key) {
>
> // get rid of the \n at the end
> $key = rtrim($key);
>
> // $more_junk is here for your benefit; there are really about
> // 20 variables in the script
> //
> // I actually don't use /t in the script, I use a real tab. I wasn't
> // sure if that would show up in the NG, though
> list ($facility, $more_junk) = explode("/t", $key);
>
> // if it's found, change the boolean and stop looking
> if ($_GET['id'] === $facility) {
> $found = TRUE;
> break;
> }
> }
>
>
> if ($found) {
> // print HTML code
> }
>
> else header("Location: index.php?error=true");
>

Well, one of your problem is the URL

http://www.wiklessmartstart.com/providers/view.php?id=Diane Benesh

is invalid. You can't have spaces in a URL. It should be

http://www.wiklessmartstart.com/providers/view.php?id=Diane%20Benesh

Browsers will try to correct for this, but it may be a problem when sending it
back into the server. Check out htmlentities() for how to convert the invalid
space to %20. It may not solve your problem, but it will fix another potential
problem you can have with some browsers.

And as for "bensch" having a special meaning in PHP (another post), no, it
doesn't. Even if it did, you wouldn't be using it in PHP here. It's strictly a
string. You could use any PHP reserved word here, also - or anything else, for
that matter.



--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация