How to add a custom display field to a content type in Drupal 6
About uneditable custom field, here is a resource with several suggestions: http://drupal.org/node/1034768

about how to use a php code for pull data inside a custom cck field (If I understood well), I guess that you can build a module for use your respective code inside this module, and show the desired data inside a custom cck. This page have information related about How to create a CCK content type and fields from a module http://drupal.org/node/1044248

I hope information be useful