Skip to content

Instantly share code, notes, and snippets.

@easterncoder
Last active April 20, 2020 17:21

Revisions

  1. easterncoder renamed this gist Apr 20, 2020. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions demo_videos.md → 01.md
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,6 @@
    **Requires at least WishList Member 3.3.6948**

    Demo Videos:

    - Incoming WebHooks - https://www.screencast.com/t/dIEjHL5kjhW
    - Outgoing WebHooks - https://www.screencast.com/t/xV9csVvbdQsJ
  2. easterncoder revised this gist Apr 20, 2020. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions demo_videos.md
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,2 @@
    Incoming WebHooks - https://www.screencast.com/t/dIEjHL5kjhW
    Outgoing WebHooks - https://www.screencast.com/t/xV9csVvbdQsJ
    - Incoming WebHooks - https://www.screencast.com/t/dIEjHL5kjhW
    - Outgoing WebHooks - https://www.screencast.com/t/xV9csVvbdQsJ
  3. easterncoder renamed this gist Apr 20, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. easterncoder created this gist Apr 20, 2020.
    3 changes: 3 additions & 0 deletions receive.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    <?php

    file_put_contents( __DIR__ . '/receive.log', print_r( $_POST, true ), FILE_APPEND );
    6 changes: 6 additions & 0 deletions send_curl-json.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    #!/bin/sh

    curl \
    -H 'Content-type: application/json' \
    -d '{"email":"[email protected]"}' \
    'YOUR-WEBHOOK-URL'
    17 changes: 17 additions & 0 deletions send_curl.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    <?php

    $post_data = array(
    'email' => '[email protected]',
    'username' => '',
    'password' => '',
    'firstname' => '',
    'lastname' => '',
    );

    $post_data = http_build_query($post_data);

    $ch = curl_init( 'YOUR-WEBHOOK-URL' );

    curl_setopt( $ch, CURLOPT_POST, 1 );
    curl_setopt( $ch, CURLOPT_POSTFIELDS, $post_data );
    curl_exec( $ch );
    5 changes: 5 additions & 0 deletions send_curl.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    #!/bin/sh

    curl \
    -d '[email protected]' \
    'YOUR-WEBHOOK-URL'
    27 changes: 27 additions & 0 deletions send_form.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    <!DOCTYPE html>
    <html>
    <head>
    <title>Webhooks Test</title>
    <style type="text/css">
    input,h1 {
    display: block;
    width: 50%;
    margin: 5px auto;
    font-size: 20px;
    padding: 10px;
    }
    </style>
    </head>
    <body>
    <h1>Webhooks Test Form</h1>
    <form method="post" action="YOUR-WEBHOOK-URL">
    <input type="text" name="email" placeholder="Email Address">
    <input type="text" name="username" placeholder="Username (Email will be used if empty)">
    <input type="text" name="password" placeholder="Password (Auto-generated if empty)">
    <input type="text" name="firstname" placeholder="First Name">
    <input type="text" name="lastname" placeholder="Last Name">
    <input type="text" name="redirect" placeholder="Redirect URL">
    <input type="submit" value="Submit">
    </form>
    </body>
    </html>
    2 changes: 2 additions & 0 deletions videos.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    Incoming WebHooks - https://www.screencast.com/t/dIEjHL5kjhW
    Outgoing WebHooks - https://www.screencast.com/t/xV9csVvbdQsJ