Jump to content

php proxy authentication


putty

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.