WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] actions and curl (1 post)

  1. kkapron
    Member
    Posted 5 years ago #

    Hello,
    I'm trying to add action which uses curl functions which would be called when someone comment a post.

    It's look like:

    function my_func() {
       $url = 'http://something/file.php';
       $c = curl_init($url);
       if( $c ) {
          /* doing something */
          curl_close($c);
       }
    }
    
    add_action('comment_post', 'my_func');

    This usage doesn't work at all - I have a blank page after making new comment on the blog. I've checked that it crashes when I call curl_init(). Does anyone have some similar problems?

Topic Closed

This topic has been closed to new replies.

About this Topic