Voici le code source :
<?php $AFF_NUMBER = "AFF8461"; $mix_lien_redirect = ""; $COOKIES_MIXAD = $_SERVER["HTTP_COOKIE"]; function GetServicePA() { global $AFF_NUMBER ; global $mix_lien_redirect; global $COOKIES_MIXAD; $COOKIES_MIXAD = $COOKIES_MIXAD; $mix_redirect=False; $mix_fichiers=""; $mix_headers=""; $mix_dc = 0; $mix_form=""; $mix_bo=""; $mix_variables=""; $mix_buf=""; $mix_header = true; $mix_result = ""; $mix_urlsitebase=$_COOKIE["MixadUrlSiteBase"]; $mix_method = $_SERVER["REQUEST_METHOD"]; $mix_host = "perso.mixad.com"; $mix_create_form = $_GET["create_form"]; $mix_path = "/"; $mix_port = 80; $mix_strcookie = ""; $mix_headerclient=""; $mix_lien_http = $_GET["lien_http"]; if ($mix_lien_http == "") { $mix_lien_http=$_GET["url_mixad"]; } //Extraction du path if ($mix_lien_http!="") { $mix_path = $mix_lien_http; $pos = strpos($mix_path,"?"); if (is_int($pos)) { $mix_path = substr($mix_path,0,$pos); $mix_variables = substr($mix_lien_http,$pos+1) . "&"; } } //Extraction des variables du GET if ($mix_create_form=="") { foreach($_GET as $key=>$elem) { if ($key!="lien_http" && $key!="action_http" && $key!="url_mixad") { $mix_variables .= $key . "=" . urlencode($elem) . "&"; } } } //Interrogation du serveur IIS/MixadPerso distant //pour affichage du service de petites annonces $fp = fsockopen($mix_host,$mix_port, $errno, $errstr,300); if (!isset($_COOKIE["MIXADTRACKING"]) || !strpos($_COOKIE["MIXADTRACKING"],"TCKID=" . $AFF_NUMBER) ) { $mix_variables.="TCKID=". $AFF_NUMBER . "&NBCVERSION=PHP2&"; } $mix_headers.="$mix_method $mix_path?$mix_variables HTTP/1.1\r\nHost: $mix_host\r\n"; //On repasse tous les cookiees précédemment récupérés if (isset($COOKIES_MIXAD)&&$COOKIES_MIXAD!="") { $mix_headers.="Cookie: ".$COOKIES_MIXAD."\r\n"; } $mix_headers.="Accept: */*\r\n"; $mix_headers.="Connection: Keep-Alive\r\n"; if ($mix_create_form == "2") { $bo_key = substr(md5($local_file.time()), 1, 15); $mix_bo="-----------------------------".$bo_key; $mix_form.="Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*\r\n"; $mix_form.="Accept-Charset: iso-8859-1,*,utf-8\r\n"; $mix_form.="Content-type: multipart/form-data; boundary=$mix_bo\r\n"; $mix_bo="-----------------------------".$bo_key."\r\n"; foreach($_GET as $key=>$val) { if ($key!="create_form" && $key!="lien_http" ) { $ds =sprintf("%sContent-Disposition: form-data; name=\"%s\"\r\n\r\n%s\r\n", $mix_bo, $key, $val); $mix_dc += strlen($ds); } } $mix_dc += strlen($mix_bo)+3; $mix_form.="Content-length: $mix_dc \r\n"; $mix_form.="\r\n"; foreach($_GET as $key=>$val) { if ($key!="create_form" && $key!="lien_http" ) { $ds =sprintf("%sContent-Disposition: form-data; name=\"%s\"\r\n\r\n%s\r\n", $mix_bo, $key, $val); $mix_form.=$ds; } } $mix_bo = "-----------------------------".$bo_key . "--"; $mix_form.=$mix_bo; } //Si create_form = 1 if ($mix_create_form == "1") { foreach($_GET as $key=>$val) { if ($key!="create_form" && $key!="lien_http" ) { $mix_form .= $key . "=" . urlencode($val) . "&"; } } $mix_form = substr($mix_form,0,strlen($mix_form)-1); $mix_headers.="Content-type: application/x-www-form-urlencoded\r\n"; $mix_headers.="Content-length: ". strlen($mix_form) ."\r\n\r\n"; } if ($mix_create_form == "") { $mix_headers.="\r\n"; } fputs($fp, $mix_headers); fputs($fp, $mix_form."\r\n\r\n"); //Récupération du résultats while(!feof($fp)) { $line = fgets($fp,4096); //Gestion des redirect de la Plate-Forme IIS if ($line != "HTTP/1.1 302 Object moved\r\n") { if ( $line == "\r\n"&&$mix_header) $mix_header = false; //traitement des cookie renvoyés if (substr($line,0,10) == "Set-Cookie") { $mix_strcookie .= $line; $dline=urldecode($line); $firstpos=strpos($dline,'URL_BASE_AFFILIEUR='); if ($firstpos!= false) { $firstpos+=19; $secpos=strpos($dline,'&ISAFFILIEUR'); $mix_urlsitebase = substr($dline,$firstpos,$secpos-$firstpos); $mix_strcookie .= 'Set-Cookie: MixadUrlSiteBase='. urlencode($mix_urlsitebase) . "; path=/\r\n"; } } if ( $mix_header == false ) { $mix_result = $fp; break; } } else { $mix_redirect = True; while(!feof($fp)) { $line = fgets($fp,4096); if ($line == "\r\n") { break; } if (substr($line,0,9) == "Location:") { $mix_lien_redirect = str_replace("\r\n","",substr($line,10)); } //traitement des cookie renvoyés if (substr($line,0,10) == "Set-Cookie") { $mix_strcookie .= $line; $dline=urldecode($line); $firstpos=strpos($dline,'URL_BASE_AFFILIEUR='); if ($firstpos!= false) { $firstpos+=19; $secpos=strpos($dline,'&ISAFFILIEUR'); $mix_urlsitebase = substr($dline,$firstpos,$secpos-$firstpos); $mix_strcookie .= 'Set-Cookie: MixadUrlSiteBase='. urlencode($mix_urlsitebase) . "; path=/\r\n"; } } } break; } } if ($mix_redirect) { header("HTTP/1.1 301 Moved Permanently"); $mix_headerclient.="Location: ".$mix_urlsitebase."lien_http=".urlencode($mix_lien_redirect)."\r\n"; $mix_headerclient.="Connection: Close\r\n"; fclose($fp); } $mix_headerclient.=$mix_strcookie; header($mix_headerclient); if ($mix_redirect) { exit; } return $mix_result; } function DisplayServicePA ($MyfpMixad) { while(!feof($MyfpMixad)) { $line = fgets($MyfpMixad,4096); echo($line); if ($line == "</html>\r\n") { break; } } fclose($MyfpMixad); } $fpMixad=GetServicePA(); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <TITLE>Freequality - Petites annonces</TITLE> <meta name="title" content="Freequality - Petites annonces auto, immobilier, emploi, rencontres"> <META NAME="DESCRIPTION" content="Freequality vous permet de consulter des petites annonces sur toute la France. Annonces classées par thème et par région / département (auto, immobilier, emploi, rencontres, ...) Passer une annonce visible par plus de 2 000 000 de personnes !"> <META NAME="KEYWORDS" CONTENT="annonces, petites annonces, petite annonce, annonce, auto, immobilier, rencontres, emploi, vacances"> <meta name="robots" content="index, follow"> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); //--> </script> <style type="text/css"> <!-- .Style1 { color: #FFFFFF; font-weight: bold; font-family: Geneva, Arial, Helvetica, sans-serif; } --> </style> </head> <body> <center> <p><a href="http://freequality.free.fr"><img src="../Images/Index/freequality.gif" alt="Freequality - Petites Annonces auto, moto, bateaux, immobilier, emploi, rencontres, informatique, téléphonie, jeux vidéo, maison, loisirs, animaux" width="580" height="91" border="0"></a></p> <p><br> <?DisplayServicePA($fpMixad);?> <br> <a href="http://freequality.free.fr?page=inscription_partenariat"><img src="http://webmasters.clubannonces.com/imgpromo/pub2.gif" width="468" height="60" border="0" alt="Webmasters - Contenu et Argent ici avec votre rubrique Petites Annonces"></a><BR> </p> <p> <!--DEBUT WEBOSCOPE FREE - Weborama --> </p> <p> </p> <p> <script type="text/javascript" language="javascript"> WEBO_ZONE=1; WEBO_PAGE=1; webogold_ok=0;</script> <script type="text/javascript" language="javascript" src="http://script.weborama.fr/gold.js"></script> <script type="text/javascript" language="javascript"> if(webogold_ok==1){webogold_zpi(WEBO_ZONE,WEBO_PAGE,176763);}</script> <NOSCRIPT> <A HREF="http://www.weboscope.com">Weboscope</A> mesure d'audience, statistiques, ROI<BR> <A HREF="http://www.weborama.fr">Classement des meilleurs sites</A> et positionnement </NOSCRIPT> <!-- fin de mon code--> </p> </center> <div id="Layer1" style="position:absolute; left:842px; top:60px; width:120px; height:600px; z-index:5"> <script type="text/javascript"><!-- google_ad_client = "pub-8389649093967888"; google_ad_width = 120; google_ad_height = 600; google_ad_format = "120x600_as"; google_ad_type = "text"; google_ad_channel =""; google_color_border = "FFFFFF"; google_color_bg = "FFFFFF"; google_color_link = "3333CC"; google_color_url = "008000"; google_color_text = "330000"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> <div id="Layer2" style="position:absolute; left:21px; top:60px; width:120px; height:600px; z-index:6"> <script type="text/javascript"><!-- google_ad_client = "pub-8389649093967888"; google_ad_width = 120; google_ad_height = 600; google_ad_format = "120x600_as"; google_ad_type = "text"; google_ad_channel =""; google_color_border = "FFFFFF"; google_color_bg = "FFFFFF"; google_color_link = "3333CC"; google_color_url = "008000"; google_color_text = "330000"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> </body> </html>