lugmayrm
Forum Replies Created
-
Forum: Plugins
In reply to: [The Events Calendar] Snippet to reverse eventshave you found a solution for your problem? thx
now i have changed to wp_remote_get – in file sms77.class.php – and now it would work.
`<?php
class sms77 extends WP_SMS {
private $wsdl_link = “https://gateway.sms77.de/”;
public $tariff = “http://www.sms77.de”;
public $unitrial = false;
public $unit;
public $flash = “enable”;
public $isflash = false;public function __construct() {
parent::__construct();
$this->validateNumber = “0049171999999999 or 0171999999999 or 49171999999999”;
}public function SendSMS() {
// Check gateway credit
if ( is_wp_error( $this->GetCredit() ) ) {
return new WP_Error( ‘account-credit’, __( ‘Your account does not credit for sending sms.’, ‘wp-sms’ ) );
}/**
* Modify sender number
*
* @since 3.4
*
* @param string $this ->from sender number.
*/
$this->from = apply_filters( ‘wp_sms_from’, $this->from );/**
* Modify Receiver number
*
* @since 3.4
*
* @param array $this ->to receiver number
*/
$this->to = apply_filters( ‘wp_sms_to’, $this->to );/**
* Modify text message
*
* @since 3.4
*
* @param string $this ->msg text message.
*/
$this->msg = apply_filters( ‘wp_sms_msg’, $this->msg );/* $result = @file_get_contents( $this->wsdl_link . ‘?u=’ . urlencode( $this->username ) . ‘&p=’ . urlencode( $this->password ) . ‘&text=’ . urlencode( $this->msg ) . ‘&to=’ . implode( $this->to, “,” ) . ‘&type=quality&from=’ . urlencode( $this->from ) ); */
$result = @wp_remote_get( $this->wsdl_link . ‘?u=’ . urlencode( $this->username ) . ‘&p=’ . urlencode( $this->password ) . ‘&text=’ . urlencode( $this->msg ) . ‘&to=’ . implode( $this->to, “,” ) . ‘&type=quality&from=’ . urlencode( $this->from ) );
/* es kommt array retour und im array body ist wert */if ( $result[‘body’] == ‘100’ ) {
$this->InsertToDB( $this->from, $this->msg, $this->to );/**
* Run hook after send sms.
*
* @since 2.4
*
* @param string $result result output.
*/
do_action( ‘wp_sms_send’, $result[‘body’] );return $result[‘body’];
}return new WP_Error( ‘send-sms’, $result[‘body’] );
}public function GetCredit() {
// Check username and password
if ( ! $this->username && ! $this->password ) {
return new WP_Error( ‘account-credit’, __( ‘Username/Password does not set for this gateway’, ‘wp-sms’ ) );
}$result = @wp_remote_get( $this->wsdl_link . ‘balance.php?u=’ . urlencode( $this->username ) . ‘&p=’ . urlencode( $this->password ) );
return $result[‘body’];
}
}’
Thanks for help- This reply was modified 8 years, 2 months ago by lugmayrm.
I have tested from my website with cURL test applaince- and it returns the right answere. but with wpsms doese not work.
thanks for help.
Martin
this will also be ok
https://gateway.sms77.de/balance.php?u=user903403&p=TrY8reXXXXXapikeyXXXXXXXXXXXboa4
if I make
https://gateway.sms77.io/api/balance?u=user903403&p=TrY8reXXXXXapikeyXXXXXXXXXXXboa4
it will come message 300 – i think errorif I try
https://gateway.sms77.io/api/balance?u=user903403&p=TrY8reXXXXXapikeyXXXXXXXXXXXboa4
it will be OK!
difference –
1. sms77.io/api
2. &Information of the gateway https://www.sms77.io/de/docs/gateway/http-api/guthaben/
yes i have
Your server’s PHP cURL version information and features:
cURL version: 7.26.0
Host: x86_64-pc-linux-gnu
IPv6 support: yes
Kerberos V4 support: no
SSL support: yes
SSL version: OpenSSL/1.0.1t
libz HTTP deflate support: yes
libz version: 1.2.3.4
Protocols: dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtmp, rtsp, scp, sftp, smtp, smtps, telnet, tftpForum: Plugins
In reply to: [Checkout Field Editor (Checkout Manager) for WooCommerce] readonlyMy questen would if ther is able in pro Version – i found it not in docu
where can i do in pro