I have this bit of code that I am using first I used the javascript code given by alexa then I added an bit of code from a wordpress plugin and here is what I have <p> <SCRIPT type='text/javascript' language='JavaScript' src='http://xslt.alexa.com/site_stats/js/t/a?url=<?php $values = get_post_custom_values("link"); echo $values[0]; ?> ></SCRIPT></p> Code (markup): Now the problem is its giving this as a result when ran <SCRIPT type='text/javascript' language='JavaScript' src='http://xslt.alexa.com/site_stats/js/t/a?url=[COLOR="Red"]http://[/COLOR]www.mysite.com'></SCRIPT></p> Code (markup): What I cant seem to find out or know how to do is remove the http:// using a strip command. Does anyone know a way to get around this? I have it solved now created a new field in wordpress and called it url and added the url without the http:// and changed the 'link' to 'url' and works perfect
Hi, Try this: <p><SCRIPT type='text/javascript' language='JavaScript' src='http://xslt.alexa.com/site_stats/js/t/a?url=<?php $values = get_post_custom_values("link"); echo str_replace($values[0], "http://", ""); ?> ></SCRIPT></p> PHP: Regards, Steve