The pairwise comparison method is an interesting technique for building a global ranking from binary comparisons. In fact, some web search engines use this method to quantify the importance of a set of web sites. The purpose of this paper is to search a set of priority weights from the preference information contained in a general pairwise comparison matrix; i.e., a matrix without consistency and reciprocity properties. For this purpose, we consider an approximation methodology within a distance-based framework. In this context, Goal Programming is introduced as a flexible tool for computing priority weights.