Created
November 23, 2023 03:49
-
-
Save ambiorixg12/c787f5828a1d1f753f412635475b982d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Initialize a cURL session | |
$ch = curl_init(); | |
// Create a query string from the array of parameters | |
$params = array( | |
"username" => "sms", | |
"password" => "1982", | |
"phonenumber" => "18097143489", | |
"message" => "122", | |
"port" => "gsm-1.4" | |
); | |
$query = http_build_query($params); | |
// Set the URL with the query string and other options | |
curl_setopt($ch, CURLOPT_URL, "http://10.0.0.5/sendsms?" . $query); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
// Execute the request and get the response | |
$response = curl_exec($ch); | |
// Close the cURL session | |
curl_close($ch); | |
// Print the response | |
echo $response; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment