Gridbox
Overview
Website
eCommerce
Booking
Directory
Blog
Portfolio
All features
Pricing
Forms
Overview
Integrations
All features
Pricing
Gallery
Overview
All features
Pricing
Help Center
Documentation
Community Forums
Feature requests
Tutorials and guides
Experts
Newsroom
Sign in
Bundle
Gridbox
Overview
Website
eCommerce
Directory
Blog
Portfolio
Booking
Themes
Showcase
All features
Pricing
Advanced tools
Responsive editing
Performance tools
SEO tools
Reviews and comments
Code editor
Photo editor
Media manager
Forms
Forms overview
Online payments
Email signup
Calculation
Contact
Layout
Design
All features
Pricing
Popular integrations
Google Drive
Google Sheets
MailChimp
Mollie
All integrations
Data Storage
Emailing
Mapping
Payment Processing
Spam Protection
Other
Gallery
Gallery overview
All features
Photo editor
Media manager
Pricing
Help
Help center
Documentation
Tutorials and guides
Video tutorials
Community forums
Experts
Contact custommer support
Feature requests
Find an Expert
Shabalaa
Studio ter Avest
Browse experts
Newsroom
Newsroom
Gridbox updates
Forms updates
Mailer updates
Gallery updates
Company news
Browse all news
Sign in
Bundle
Gridbox 2.20.5.0. Security Deep Dive
Read More
Community forums
Help center
Community forums
Feature requests
Experts
Contact us
Community forums
Help center
Community forums
Feature requests
Experts
Contact us
Help
Community Forums
Forms
Integrations
LINE Notify After Submit form
natthida
January 14, 2024
2 Comments
1054 Views
I try to find php script to using LINE Notify. I'm stuck with a code issue and need some expert advice.
I've tried insert code below in php script, but it's not working.
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$message = isset($_POST['message']) ? $_POST['message'] : '';
// LINE Notify
$token = 'xxxx'; // Token
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://notify-api.line.me/api/notify");
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/x-www-form-urlencoded',
'Authorization: Bearer ' . $token
));
curl_setopt($ch, CURLOPT_POSTFIELDS, 'message=' . urlencode($message));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// error check
if (!$response) {
echo 'Error: ' . curl_error($ch);
} else {
echo 'Message sent! Response: ' . $response;
}
}
https://notify-bot.line.me/en/
Could you please take a look at my code and suggest any fixes? Your help would be really appreciated.
Replies are visible only to logged in members with an active subscription.
Sign In
Related topics
Forms to Robokassa
re
11 Comments
Invisible reCAPTCHA v3 on Forms
Lecubs
1 Comments
Balbooa Forms Integration with Google Sheets Stuck on 'Installing' Message
Raul Gomez Pulido
10 Comments