Click to See Complete Forum and Search --> : Requesting a URL from within code
modpluz
May 20th, 2006, 04:55 AM
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.
penagate
May 21st, 2006, 05:22 AM
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() (php.net/file_get_contents) to retrieve a page.
modpluz
May 21st, 2006, 05:19 PM
actually i used the file() function but i was thinking there should be a better way.
visualAd
May 22nd, 2006, 02:44 AM
You can use CUrl (http://www.php.net/curl) if it has been enabled on your hosting server. You cna check by making a file which callls phpinfo() and search for curl.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.