Créer un site internet

comment Utiliser un proxy

Utiliser un proxy avec Firefox

Paramètres > Avancé > Réseau > Connexion (paramètres) > Configuration manuelle du proxy

afficher »

Utiliser un proxy avec Chromes / Windows

Paramètres > Réseau > Connexion (paramètres) > Modifier paramètres du proxy > Connexion > Paramètres réseau

afficher »

Utiliser un proxy avec Opera

Réglages > Préférances > Avancé > Réseau > Serveurs proxy > Modifier paramètres du proxy > Connexion > Configurer > Paramètres réseau

afficher »

Utiliser un proxy avec Safari

Il faut passer par les parametres réseau de Windows: Options internet > Connexion > Paramètres réseau > Serveur proxy

afficher »

Utiliser un proxy avec Windows

Options internet > Connexion > Paramètres réseau > Serveur proxy

afficher »

Utiliser un proxy avec Linux

afficher »


# vi /etc/profile
# export http_proxy=http://11.125.125.111:3128/
# export https_proxy=http://11.125.125.112:3128/
# export ftp_proxy=http://11.125.125.113:3128/

Utiliser un proxy avec PHP/CURL

Exemple pour l'utilisation d'un serveur proxy avec php / curl. Remplacer IP:PORT par l'ip ainsi que le port du proxy

afficher »


$headers[] = 'Accept: image/gif, image/x-bitmap, image/jpeg, image/pjpeg,text/html,application/xhtml+xml';
$headers[] = 'Connection: Keep-Alive';
$headers[] = 'Content-type: application/x-www-form-urlencoded;charset=UTF-8';
$process = curl_init( "https://www.google.com/" );
curl_setopt( $process, CURLOPT_PROXY, "IP:PORT" );
curl_setopt( $process, CURLOPT_HTTPHEADER, $headers );
curl_setopt( $process, CURLOPT_HEADER, 1 );
curl_setopt( $process, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36' );
curl_setopt( $process, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt( $process, CURLOPT_VERBOSE, true );
curl_setopt( $process, CURLOPT_SSL_VERIFYHOST, false );
curl_setopt( $process, CURLOPT_SSL_VERIFYPEER, false );
$return = curl_exec( $process );
curl_close( $process );
Aucune note. Soyez le premier à attribuer une note !

Ajouter un commentaire

Anti-spam