Forum Moderators: coopster

Message Too Old, No Replies

PHP Script, What server load will it create?

         

tetley

10:55 am on Sep 17, 2009 (gmt 0)

10+ Year Member



Hi,

I have a page that is getting served about 26,000 times each day.

I'm wanting to impliment a script that checks a posted url to the page to see if it contains the word google.

The script would look something like below:

<?php
$myurl = $_POST[url];

$targetstring = "google";

if(stristr($myurl , $targetstring) === FALSE)
{
header ("location: nothingToDoWithGoogle.php");
exit();
}
else
{
header ("location: somethingToDoWithGoogle.php");
exit();
}
?>

Is this something that a webserver will find easy to do 26,000 times or not?

Forgive me if this seems like an easy question but i'm still reasonable new to web development and I struggle to know what impact my php scripts will have on the server and how fast it will be able to process them.

Thanks.

Pico_Train

11:14 am on Sep 17, 2009 (gmt 0)

10+ Year Member



I won't comment on speed but I would be worried about doing the above where it might seem you might be cloaking. If the user comes from a search engine you send them one piece of content, if they don't you send them another, that might appear to be deceptive and get you into trouble.

That's just my opinion, use it don't use it, up to you.

tetley

11:38 am on Sep 17, 2009 (gmt 0)

10+ Year Member



It's a little complicated to explain which is why I didn't earlier. The reason the user gets to the page is because it is a filter page on a large organisation's network. The problem is that the system works by blocking all uncategorised content, meaning that if the user types in “www.google” they get a filter block page as it is not categorised. I want to redirect the users who have mistyped the website straight through to Google but was unsure if it would be too much load to put on the server.

Thanks,