I need to access my website by using the IP address and not a domain name or subdomain. Is this possible? I see the IP address in the admin center, but when I type it into my browser, it says there was a 403 error. So is there a way to access my website via IP address?
You cannot access your site by IP because your site is not the only one on that IP address. What do you need to do this for?
Iām using an Arduino to access a php file on my website to pull a text string, store it as a variable, and do something with it. Whenever I try accessing that file on my website using my domain name, it returns this:
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 19 May 2021 16:38:03 GMT
Content-Type: text/html
Content-Length: 856
Connection: close
Vary: Accept-Encoding
Expires: Thu, 01 Jan 1970 00:00:01 GMT
Cache-Control: no-cache
<html><body><script type="text/javascript" src="/aes.js" ></script><script>function toNumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});return e}function toHex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}var a=toNumbers("f655ba9d09a112d4968c63579db590b4"),b=toNumbers("98344c2eee86c3994890592585b49f80"),c=toNumbers("72ed5e80a6a124862d4208ba61cad4b0");document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+"; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/"; location.href="";</script><noscript>This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support</noscript></body></html>
However, it should return this:
HTTP/1.1 200 OK
Date: Wed, 19 May 2021 16:22:19 GMT
Server: Apache/2.4.38 (Raspbian)
Content-Length: 24
Connection: close
Content-Type: text/html; charset=UTF-8
1816.95;2000.00;90.8475
That string of numbers at the end is what I want to store in a variable on the Arduino.
Any idea what the best way to do this would be? I tried it on a local webserver using an IP address and it worked (that is what the second block of code is from).
IF is meant for web hosting.
Ensuring only web browsers can access your website ā¦
4 Likes
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.