Jump to content

Using curl to send get request


Danny620

Recommended Posts

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);

Link to comment
https://forums.phpfreaks.com/topic/262341-using-curl-to-send-get-request/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.