Forums

Send post's url to third party server when post is published (1 post)

  1. sf89
    Member
    Posted 10 months ago #

    Hi,
    I'm working on a simple plugin that would send to my server the url of a post when an admin hits publish.
    I've seen that I could do that via email, but is there a way to push this url directly to a table on my server?
    Thanks!
    PS: I'm new to web development ;)

    Here's how I'd do it via email, but I'm not even sure it would work:

    function email_friends($post_ID)  {
        $email = 'urls@example.org';
        $url = get_permalink();
        mail($email, "new url",
          '$url');
        return $post_ID;
    }

Reply

You must log in to post.

About this Topic