• Javier

    (@ivaxtobachotmailcom)


    I don’t want to cache a part of code that it uses ip to know country. I tried it

    <!--mfunc -->
    <?php
    	$country = pais_visitante();
    	if ($country=="ES") { $pais="Espa?a"; } elseif
                 ($country=="MX") { $pais="Mexico"; } elseif
                     ($country=="AR") { $pais="Argentina"; } elseif
                         ($country=="CO") { $pais="Colombia"; }
                           else $pais="Común";
    ?>
    <!-- /mfunc -->

    but it don’t works. What can i do?

    https://www.ads-software.com/extend/plugins/w3-total-cache/

Viewing 1 replies (of 1 total)
  • Thread Starter Javier

    (@ivaxtobachotmailcom)

    I try it too

    <!--MFUNC mycode -->
    <?php
    	$country = pais_visitante();  // function to get Country Code
    	if ($country=="ES") { $pais="Espa?a"; } elseif
                  ($country=="MX") { $pais="Mexico"; } elseif
                     ($country=="AR") { $pais="Argentina"; } elseif
                         ($country=="CO") { $pais="Colombia"; }
    			else { $pais="Común"; $offset=4; }
    ?>
    <!-- /mfunc mycode -->

    But still caching this part. I trying remove <?php but in this case it’s echo on web.

    I’m desperated. Please give me a solution please

Viewing 1 replies (of 1 total)
  • The topic ‘Don't cache some code’ is closed to new replies.