I have enabled an option to create sub domain dyanamically based on this post:
Here everything is working fine.
Now I am trying to load JSON formatted data by using file_get_contents() via http://dynamicsubdomain.mydomain.com. Here my code is throwing this error
Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/mydomain/public_html/test.php on line 9
if I access this without sub-domain its working fine. Even though I am not able process image by using GD, this occurring same error with path.
I understood that PHP considering that sub domain as original one, but that one is not exist in A record. but I added A record with *.mydomain.com with my IP address for dynamic option.
I can remove the subdomain by regex, then access the file. its working fine..., but is there any better way to do that?
Can anyone, help me on this? not getting any clue from web.
Thanks Peter