[Solved] I want to extract a database from a sever using an url using php code [closed]


Use file_get_contents() in php

The file_get_contents() reads a file into a string.

This function is the preferred way to read the contents of a file into a string. Because it will use memory mapping techniques, if this is supported by the server, to enhance performance.

Syntax file_get_contents(path,include_path,context,start,max_length)

<?php
    $data = file_get_contents("http://www.amazinglaundryservices.com/hybrid_app/staging_webservices/get_location_area.php");
    //echo "<pre>";
    //print_R(json_decode($data, true));
    $fileData = json_decode($data, true);
    echo "<table border="1px solid"><tr><td>area_key</td><td>location_area</td><td>sort_key</td></tr>";
    foreach($fileData as $val) {
        echo "<tr><td>".$val['area_key']."</td><td>".$val['location_area']."</td><td>".$val['sort_key']."</td></tr>";
    }
    echo "</table>";
    ?>

2

solved I want to extract a database from a sever using an url using php code [closed]