What I need to do is find the full path right down to the ip address for example "http://123.456.789.012/home/siteusername/public_html/index.php" which doesn't seem to work I must be missing a directory somewhere. I have SSH, WHM and Cpanel if it helps. Thanks.
cPanel/WHM doesn't show absolute paths like that on the HTTP side. Try http://123.456.789.012/~USERNAME/index.php if you are not using your domain.
You can use your local computer to obtain the IP. start>run> cmd and type ping yourdomain.com. This will return the IP and ping info. You can copy this script below to notepad and then upload it to your server in the directory you are trying to use. When you run the script in the browser it return the full path under the php variables portion I can't imagine what you want with this info. The path can be used in scripts but the combination of path and IP will get you nothing. It doesn't do anything. ip# / ~username/ will load the main page of your site. Good luck.
Thank you for your replies I wasnt aware that the root path did nothing, but it doesn't matter because http://123.456.789.012/~username/ worked just like I needed.