php text to speech with google api

Photo by Matheus Bertelli on Pexels.com

// Convert Words (text) to Speech (MP3) // ———————————— $word=$_POST[‘word’]; // Google Translate API cannot handle strings > 100 characters $word = substr($word, 0, 100); // Replace the non-alphanumeric characters // The spaces in the sentence are replaced with the Plus symbol $word = urlencode($word); // If the MP3 file exists, do not create a… Continue reading php text to speech with google api

WordPress bypass sanitize filter for post insert

Photo by Mads Thomsen on Pexels.com

I found solution for wordpress 3.6 and just want to share here filter had to be unset due to security problems with it. You could try doing kses_remove_filters() before inserting the post and kses_init_filters() after inserting the post if you are trying to avoid the kses filtering of the post fields. Just be wary since… Continue reading WordPress bypass sanitize filter for post insert

Sending MIME Mail with PHP

Photo by Suzy Hazelwood on Pexels.com

You can send email with PHP Mailer with attachment and MIME type, with help of following libraries 1)PHP Mailer you can download latest version from github Example: php require ‘class.phpmailer.php’; $mail = new PHPMailer; $mail->IsSMTP(); // Set mailer to use SMTP $mail->Host = ‘smtp1.example.com;smtp2.example.com’; // Specify main and backup server $mail->SMTPAuth = true; // Enable… Continue reading Sending MIME Mail with PHP

Published
Categorized as PHP Tagged ,

Jquery moving all items in listbox at once

jQuery example of moving single element from one list to another http://jsfiddle.net/RbLVQ/60/ Javascript: $(document).ready(function() { $(‘#btnRight’).click(function(e) { var selectedOpts = $(‘#lstBox1 option:selected’); if (selectedOpts.length == 0) { alert(“Nothing to move.”); e.preventDefault(); } $(‘#lstBox2’).append($(selectedOpts).clone()); $(selectedOpts).remove(); e.preventDefault(); }); $(‘#btnLeft’).click(function(e) { var selectedOpts = $(‘#lstBox2 option:selected’); if (selectedOpts.length == 0) { alert(“Nothing to move.”); e.preventDefault(); } $(‘#lstBox1’).append($(selectedOpts).clone()); $(selectedOpts).remove();… Continue reading Jquery moving all items in listbox at once

Way2sms PHP API

Hello , build your own sms base application in php with this way2sms api interface post comments and queries /** * sendWay2SMS * Function to send to sms to single/multiple people via way2sms * @author Milind * @category SMS * @example sendWay2SMS ( ‘9000012345’ , ‘password’ , ‘987654321,9876501234’ , ‘Hello World’) * @url http://milindmore22.blogspot.in/2012/07/way2sms-php-api.html *… Continue reading Way2sms PHP API

Published
Categorized as PHP Tagged