I have a URL for a HTTP-Request as the only content of an lstlisting environment, and I want to prettyprint it as follows:
color1for the first line, and for?,&, and|,color2for parameter names,color3for the parameter values (both characters and numbers).
I tried the to use the PHP language predefined by listings, but the way the base URL was typeset didn't satisfy me.
See my attempt below. As you can see, I colored the "keys" manually, which is probably not a good idea...
What should I do?

\documentclass[12pt,a4paper,oneside]{scrreprt}
\usepackage{listings}
\usepackage{xcolor}
\definecolor{color1}{rgb}{0.0, 0.0,0.6}
\definecolor{color2}{rgb}{0.29, 0, 0.29}
\definecolor{color3}{rgb}{0.25, 0.5,0.5}
\lstset{
basicstyle=\ttfamily,
columns=fullflexible,
showstringspaces=false
}
\lstdefinelanguage{url}{
moredelim=**[is][\color{color1}]{@}{@},
showstringspaces=true,
identifierstyle=\color{color2},
keywordstyle=\color{color3},
morekeywords={param1,param2,params,L},
}
\begin{document}
\lstset{language=url}
\begin{lstlisting}
http://domain.com/version/xyz.exe/abc
?L=sysname
¶m1=512
¶m2=1024
¶ms=abc
|paramA
|a
|paramB
|b
\end{lstlisting}
\end{document}

\documentclass{...}and ending with\end{document}. – jub0bs Jan 21 '14 at 14:18