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. Link to comment https://forums.phpfreaks.com/topic/76330-php-proxy-authentication/ Share on other sites More sharing options...
d.shankar Posted November 7, 2007 Share Posted November 7, 2007 You can use cURL. Link to comment https://forums.phpfreaks.com/topic/76330-php-proxy-authentication/#findComment-386503 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.