I'm assuming it's your javascript you're worried about here since calling a php script will still only show the generated code, not the source code.
Read up on using .htaccess and mod_rewrite to stop "hotlinking" = that is, calling your scripts from other sites.
It's mostly used to stop people showing your graphics or downloads on other sites and consuming your bandwidth.
Sarah