Get mx record of email addresses hosted on google apps with php then redirect page

  • Tình trạng Đã Hoàn Thành
  • Ngân sách $10 - $30 USD
  • Tổng Lượt Chào Giá 5

Mô Tả Dự Án

I need a little assistance to complete my code. I want to check for the mx record of an email address from a form on my website and if the email address is hosted by google apps then I want the page to redirect to a different page than where other emails redirect to.

I know I can check for the mx record either using dns_get_record, checkdnsrr or getmxrr() but I don't know how to complete the code.

$email = $_POST['email'];<br>

$domain = substr(strrchr($email, "@"), 1);<br>

$mx = dns_get_record('$domain', DNS_MX, );

This is where I get stuck. How would I implement this in php: if $mx includes [url removed, login to view] redirect to [url removed, login to view]

This is not a duplicate question. I am trying to use php to redirect to a new page based on the mx record of the email address. The mx record query should locate [url removed, login to view] and then redirect based on that but if mx record doesnt contain [url removed, login to view] it should redirect to a different page.

More details about this project can be found here

[url removed, login to view]

Nhận báo giá miễn phí cho dự án tương tự
Hoàn thành bởi:
Các kỹ năng yêu cầu

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Thuê những Freelancer đã đặt giá trong dự án này

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online