php - DNS server used by my shared hosting is slow. Any way too add entries like in windows' hosts file? -


I'm not experiencing with the server, so I'm sorry, if it's a noob question.

Basically I have PHP scripts that connect to the IMAP mail server like this

  imap_open ('{imap-mail.outlook.com:993/imap / ssl} INBOX ', "example @ example.com", "password");   

This code was slow on my localhost (WAMP) and my shared host (30+ seconds), while it was really fast on my VPS hosting (~ 1 second).

I have noticed that the domain name resolution was slow, so I sent an IP address ip-mail AddClique to your host file in Windows.

And then it started working fast, as if my localhost should also have ~ 1s.

But how can I fix this on my shared hosting? What is the equivalent of CAPNL in the Windows host file? Or do I have to contact my host support? Unfortunately in shared hosting, you probably do not have to specify your own DNS resolution override.

Access to / etc / hosts file. Try using the resource's IP address only and you do not need to do DNS resolution at all.

If the resource changes the IP address, then you can potentially create a separate process to determine the DNS resolution and resourcefully locate the IP, then your imap_open () Use that IP address in the call.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -