putty Posted November 7, 2007 Share Posted November 7, 2007 Am working behind a prox, this is causing problems when I try to save an image from another server. Dose anyone know how to authenticate and run this code? <?php $url = "http://onearth.jpl.nasa.gov/wms.cgi?request=GetMap&layers=global_mosaic&styles=&srs=EPSG:4326&bbox=110,-45.5,160,-8&WIDTH=1280&HEIGHT=960&format=image/jpeg "; $file = file_get_contents($url); $path = "./map/test.jpg"; if(file_put_contents($path,$file)){ //run map script } else{ //log error } ?> Thanks in advance. Quote Link to comment Share on other sites More sharing options...
d.shankar Posted November 7, 2007 Share Posted November 7, 2007 You can use cURL. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.