I added into table. but i need to ad this data to database <?php $url = "http://xxx.com/xxx.php"; $FileContent = file_get_contents($url); $SplitContent = explode("\n", $FileContent); foreach($SplitContent as $CurrValue) { echo "<tr>"; $SplitData = explode("\t", $CurrValue); foreach($SplitData as $DataValue){ echo "<td>".$DataValue."</td>"; } echo "</tr>"; } ?> PHP:
use htmlspecialchars() function to add into database <?php $txt = ' <?php $url = "http://xxx.com/xxx.php"; $FileContent = file_get_contents($url); $SplitContent = explode("\n", $FileContent); foreach($SplitContent as $CurrValue) { echo "<tr>"; $SplitData = explode("\t", $CurrValue); foreach($SplitData as $DataValue){ echo "<td>".$DataValue."</td>"; } echo "</tr>"; } ?> '; $strin = htmlspecialchars($txt); ?> PHP:
<?php $url = "http://xxx.com/xxx.php"; $FileContent = file_get_contents($url); $SplitContent = explode("\n", $FileContent); foreach($SplitContent as $CurrValue) { echo "<tr>"; $SplitData = explode("\t", $CurrValue); foreach($SplitData as $DataValue){ echo "<td>".$DataValue."</td>"; mysql_query("INSERT INTO table ('columnname') VALUES ('$DataValue')"); } echo "</tr>"; } ?> PHP: