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?
 
pareshprajapatiConnect With a Mentor Commented:
at the place of "eregi" just use "stristr".


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

Open in new window

0
 
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
 
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
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.