0

i am using this code to connect to the whois vpb_domain_whois is a array the code works fine in my localhost, but when uploaded to my host shows error could not connect to the server :

if($vpb_socket = fsockopen($vpb_domain_whois[0], 43))

Shiva Saurabh
  • 1,281
  • 2
  • 25
  • 47
ankush madaan
  • 300
  • 1
  • 16

1 Answers1

0

Is correct port open on live site?

This is usually the problem with fsockopen on hosting servers like hostgator, godaddy etc.

You can ask them to open the port.

It seems godaddy, doesn't open ports at all.

I had success with hostgator, they will open ports > 1000 if I remember correctly. But ask sales team before getting account with them.

  • i have goddady hosting plan and no clue about ports ?? do i have to ask godaddy to open any specific port..?? – ankush madaan Dec 21 '13 at 09:58
  • Well, since you're doing a connection on port 43, I guess that you need to ask them to unblock connections using the port 43. – maaudet Dec 21 '13 at 10:06
  • @Manhim from personal experience no host will unlock ports below 1000. –  Dec 21 '13 at 10:13
  • @ankushmadaan change your port to somewhere above 1000 and ask godaddy to open that specific port. –  Dec 21 '13 at 10:13
  • @manhim u r right they dont open ports other then 80,21,443 and not even ports > 1000 . so i am not able to find a solution to run this on my site. any other jack to run this..?? – ankush madaan Dec 21 '13 at 10:25
  • @ankushmadaan your only solution is to find host that will allow this. I had success with hostgator openning ports > 1000. Ask their sales staff to make sure though. p.s. godaddy sucks anyways. –  Dec 21 '13 at 10:43
  • The thing is that the port 43 is used for WHOIS and you need to access WHOIS information. I'd recommend on switching to a very small VPS like Linode, you will be able to do that. Otherwise, you could always make a search and send a lot of e-mails asking for that. Some hosts (I don't have name) block a lot less of outgoing ports. – maaudet Dec 21 '13 at 17:42
  • @Manhim yes! I didn't pay attention, but you are totally right. Btw, linone is expensive. OP can try ramnode: 512mb for 7$ a month. –  Dec 21 '13 at 17:47
  • Indeed. I mostly own dedicated servers so I don't know much about VPSes. – maaudet Dec 22 '13 at 01:30