How find this function $f(1+xy)=f(x)f(y)+f(x+y)$ let $f:\mathbb R\longrightarrow \mathbb R$,and for any real numbers $x,y$ have
$$f(1+xy)-f(x+y)=f(x)f(y)$$
and $f(-1)\neq 0$.
Find the $f(x)$
My try:let $x=y=0$,then we have
$$f(1)-f(0)=[f(0)]^2$$
let
$$x=1,y=-1,\Longrightarrow f(0)-f(0)=f(1)f(-1)$$
since $f(-1)\neq 0$,
so 
$$f(1)=0$$
so
$f(0)=0 $ or $f(0)=-1$
Then I dont know what to do.
Edit: This is from IMO2012 Shortlist, Problem A5.

try to find solution in this form :
f(x)=x²+ax+b
if we put y=-x in equation we get
f(1-x²)-f(x-x)=f(x)f(-x)
so f(1-x²)=-1+f(x)f(-x)
so (1-2x²+x^4)+a(1-x²)+b=-1+(x²+ax+b)(x²-ax+b)
this need to be true for all x so
-a-2=2b-a², a+b+1=b²-1
so a=b²-b-2=(b+1)(b-2)
also a(a-1)=2(b+1)
so (b+1)(b-2)(b²-b-3)=2(b+1)
so one solution is b=-1,a=0 so f(x)=x²-1 is solution
other is maybe when b³-3b²-b+4=0
i.e. if we put b-1=t we have t³-4t+1=0
solutions are t1~-2.1149 ,t2~0.25410 , t3~1.8608
then a=(b+1)(b-2)=(t+2)(t-1)
but a must be 0,so these 3 solutions aren't our solutions
just f(x)=x²+1
if we assume f(x)=x+c
then 1-x²+c=-1+(x+c)(c-x)
so 1+c=-1+c²
i.e. c²-c-2=0 i.e. (c+1)(c-2)=0
so c=-1 or c=2
but when we check we see f(x)=x-1 is solution,
so f(x)=x-1 or f(x)=x²-1
also we can prove that f(x)=x^n-1 isn't solution for n>2,n natural number
that means that these two are the only two polynomial with positive integer degrees that satisfy.
