Plugin Free) Want to monetize the content you create for your blog? Français (Plugin gratuit) Allopass qui vous permettra de monétiser votre site. Version: 1.0.4 Author: HP Developpement / Writoo Author URI: http://allopass.writoo.com License: GPLv2 or later */ define("URL_ALLOPASS",plugin_dir_url( __FILE__ )); define("DIR_ALLOPASS",dirname( __FILE__ ) ."/"); add_action('admin_menu', 'wp_allopass' ); if (!is_home()) add_filter('the_content', 'allopass_content',100); register_activation_hook( __FILE__, 'allopass_init' ); register_deactivation_hook(__FILE__, 'allopass_deactivation'); /*********************** Suppression du programme ****************/ function allopass_deactivation() { $del["del"]=getenv("HTTP_HOST"); allopass_post($del); } /*********************** Activation du programme ****************/ function allopass_init() { $add[]=""; allopass_post($add); } // --------------------------------------------------- function allopass_content($content) { $page= get_permalink($post->ID); $param = get_post_meta( 2, 'param',true); $expli = get_post_meta( 2, 'expli',true); $r = $content; $q = explode('[allopass]',$r); if (count($q>1)) { $r = $q[0] ."
" . nl2br(get_post_meta( 2, "expli", true)) . "

"; $r .= file_get_contents(URL_ALLOPASS . "allopass1.php?page=$page¶m=$param&expli=$expli"); } if (isset($_GET["err"])) $r = "
Code erroné / Erroneous code

" . $r; else if (isset($_GET["ok"])) { if (file_get_contents("http://www.writoo.com/verif.php?code=" . $_GET["ok"]) ==1) $r= str_replace("[allopass]","",$content); } return $r ; } function wp_allopass() { add_options_page('Allopass', 'Allopass' , 'manage_options', 'Allopass_admin', 'Allopass_options'); } function allopass_options() { if (!isset($_GET["lang"])) { $lang = get_post_meta( 2, "lang", true); if ($lang=="") $lang="fr" ; require_once(DIR_ALLOPASS . "$lang.php"); $lang="fr"; } else { require_once(DIR_ALLOPASS . $_GET["lang"] . ".php"); $lang = $_GET["lang"] ; delete_post_meta( 2, "lang"); add_post_meta( 2, "lang", $lang); } delete_post_meta( 2, "err"); foreach($_GET["err"] as $key=>$value) add_post_meta( 2, "err", "Code erroné"); if (!current_user_can('manage_options')) { wp_die( __('You do not have sufficient permissions to access this page.') ); } $param = ""; $expli = ""; if (isset($_POST)) { if (isset($_POST["param"])) { delete_post_meta( 2, "param"); add_post_meta( 2, "param", trim($_POST["param"])); } if (isset($_POST["expli"])) { delete_post_meta( 2, "expli"); add_post_meta( 2, "expli", trim($_POST["expli"])); } } $param = get_post_meta( 2, "param", true); $expli = get_post_meta( 2, "expli", true); if (trim($expli)=="") $expli = CETTEPAGE ; ?>

$value) echo "";?>







Allopass
array( 'timeout' => 5, 'method' => "POST", 'header' => "Accept-language: fr\r\n". "Content-type: application/x-www-form-urlencoded\r\n", 'content' =>http_build_query($datas) )); $context = stream_context_create($options); $fh = fopen( 'http://www.writoo.com/scriptallo.php', 'r', false, $context); // Récupération des meta informations du flux $meta = stream_get_meta_data( $fh ); // Récupération des headers sous forme de tableau $headers= $meta['wrapper_data']; // Récupération de la réponse du serveur $retour= ''; while( !feof( $fh ) ) $retour .= fread( $fh, 1024 ); fclose( $fh ); echo $retour; } ?>