what is the best way to request a url from within a php code without changing the page url and without using ajax.
i don't need to return any parameter(s) back to my page.
Printable View
what is the best way to request a url from within a php code without changing the page url and without using ajax.
i don't need to return any parameter(s) back to my page.
What do you want to use it for then?
Most of the file system functions support the URL wrappers, so you can use things like file_get_contents() to retrieve a page.
actually i used the file() function but i was thinking there should be a better way.
You can use CUrl if it has been enabled on your hosting server. You cna check by making a file which callls phpinfo() and search for curl.