I want to get the contents of a file on my computer from my website , But not uploading it to that website and then get the contents because the file contents changes dynamically , I tried to turn the folder that contains that file to a URL so the URl whould be something like that : http://127.0.0.1:port or http://myIpAddress:port ,
and tried to use both file_get_contents() and cURL but I got errors and they are not working ,
I allowed xmlHTTPrequest to the directory but still can't use it .
Some of the errors:
when using 127.0.0.1:port :
1- file_get_contents(): failed to open stream: Connection refused
2- curl faild to connect to 127.0.0.1
when using my ip then the port:
1- file_get_contents no route to host
2- curl bool(false)
So is there is another way to get contents from a file from my website ?