I Have to Implement text message feature for my application for that i have a php file which i get from service provider where need to place db details.and give its path to service provider to add in server. I am confused where to place and according to him if i give that file path in url it should return contact number and message body but i am unable to test it.
script looks as
<?php
// MySQL table outbox:
// CREATE TABLE outbox(sender VARCHAR(255), rcpt VARCHAR(255), body VARCHAR(255));
$mysql_host = "localhost";
$mysql_base = "school_laravel";
$mysql_user = "root";
$mysql_password = "";
$table = "outbox";
mysql_connect($mysql_host, $mysql_user, $mysql_password);
mysql_select_db($mysql_base);
mysql_query("LOCK TABLES $table WRITE, $table AS $table" . "_read READ");
$get_query = "SELECT * FROM $table AS $table" . "_read";
$del_query = "DELETE FROM " . $table;
if ($_GET['device'] != '') {
$suffix = " WHERE sender='" . $_GET['device'] . "'";
$get_query .= suffix;
$del_query .= suffix;
}
$result = mysql_query($get_query);
echo '<messages>';
while ($array = mysql_fetch_array($result)) {
echo '<message msisdn="' . $array['rcpt'] . '">' . $array['body'] . "</message>\n";
}
mysql_query($del_query);
mysql_query("UNLOCK tables");
echo '</messages>';
?>
My Question is that where should i place it in laravel Directory and is it possible to get a table details as i mentioned DB details in above script.
Thanks for Help