How do I get data from requested server page? <p>I got two php pages: <strong>client.php</strong> and <strong>server.php</strong></p> <p><strong>server.php</strong> is on my web server and what it does is open my amazon product page and get price data and serialize it and return it to <strong>client.php</strong>.</p> <p>Now the problem I have is that <strong>server.php</strong> is getting the data, but when I return it and do <code>echo</code> after using <code>unserialize()</code>, it shows nothing. But if I do <code>echo</code> in <strong>server.php</strong>, it shows me all the data. </p> <p>Why is this happening? Can anyone help me please? </p> <p>This the code I have used:</p> <p><strong>client.php</strong></p> <pre><code>$url = "http://www.myurl.com/iec/Server.php?asin=$asin&amp;platform=$platform_variant"; $azn_data = file_get_contents($url); $azn_data = unserialize($azn_data); echo "\nReturned Data = $azn_data\n"; </code></pre> <p><strong>server.php</strong></p> <pre><code>if(isset($_GET["asin"])) { $asin = $_GET["asin"]; $platform = $_GET["platform"]; echo "\nASIN = $asin\nPlatform = $platform"; //Below line gets all serialize price data for my product $serialized_data = amazon_data_chooser($asin, $platform); return($serialized_data); } else { echo "Warning: No Data Found!"; } </code></pre>