Error : Deprecated: Function eregi() is deprecated

Putting an email form on my site as per instructions at  http://www.ibdhost.com/contact/

It works - But it throws that error at me..

Deprecated: Function eregi() is deprecated in /home/petenetl/public_html/KB/Article/sendeail.php on line 24

the line in the page it don't like is below. Some googling tells me that my host is probably using a newer verion of .php

So what can I change that bit of code to that will work?

Be aware I know nothing about code other than how to copy and paste it :(

Thanks




if (eregi('http:', $notes)) {  <<<<This one
die ("Do NOT try that! ! ");
}

Open in new window

LVL 58
Pete LongTechnical ConsultantAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Om PrakashCommented:
This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.
Use preg_match instead of eregi
0
pareshprajapatiCommented:
at the place of "eregi" just use "stristr".


if (stristr('http:', $notes)) {
die ("Do NOT try that! ! ");
}

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Pete LongTechnical ConsultantAuthor Commented:
Thanks I got that much from google :)

a. it it that line that need to change or loads of lines?
b. As earlier stated I couldn't write code to save my life.
0
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

Pete LongTechnical ConsultantAuthor Commented:
thanks pareshprajapati testing now.................
0
Pete LongTechnical ConsultantAuthor Commented:
..........awesome pareshprajapati that's exactly what I needed thanQ
0
Pete LongTechnical ConsultantAuthor Commented:
Perfect!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.