Danny620 Posted May 10, 2012 Share Posted May 10, 2012 I want to be able to send a GET request to another website for example i want to be able to run this http://www.mywebsite.com/blog.php?clear_cache= using curl but when i use curl the website is loaded into my own heres my code $curl = curl_init(); $json_url = $_SESSION['blog_base'] . 'blog.php?empty_cache='; curl_setopt ($curl, CURLOPT_URL, "$json_url"); $ANSWER=curl_exec ($curl); curl_close ($curl); Quote Link to comment Share on other sites More sharing options...
Danny620 Posted May 10, 2012 Author Share Posted May 10, 2012 any help? Quote Link to comment Share on other sites More sharing options...
xyph Posted May 10, 2012 Share Posted May 10, 2012 If you just want to trigger a request to the page, you can use file_get_contents instead, assuming allow_url_fopen is enabled Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.