Advertisement
Guest User

Untitled

a guest
Jun 8th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. // Controlla che testo e destinatario siano stati impostati
  2. if (!isset($_REQUEST['text'])||($_REQUEST['text']=='')){
  3. reindirizza($paginaKo,'Invio fallito: Il testo del messaggio non può essere vuoto!');
  4. }
  5. else if (!isset($_REQUEST['recipient'])||($_REQUEST['recipient']=='')) {
  6. reindirizza($paginaKo,'Invio fallito: Il destinatario non può essere vuoto!');
  7. }
  8. else{
  9.  
  10. // Prepara il comando per il gateway SMS
  11.  
  12. $parametri= 'username='
  13. .urlencode($username)
  14. .'&password='
  15. .urlencode($password)
  16. .'&recipient=%2b39'
  17. .urlencode($_POST['recipient'])
  18. .'&text='
  19. .urlencode($_POST['text'])
  20. .'&nosender='
  21. .$noSender
  22. .'&senderNumber='
  23. .urlencode($senderNumber)
  24. .'&senderString='
  25. .urlencode($senderString)
  26. ;
  27.  
  28.  
  29. $headers = "User-Agent: Generic Client\r\n"."Connection: Close\r\n";
  30. $response = do_post_request($serverURL, $parametri, $headers);
  31. fwrite($scrivi_file,"stringa2");
  32. fclose($scrivi_file);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement