The question is as the title says. Here, the interval $I$ is not necessary bounded, for example, $f(x)=1/{(1+e^{x})}$ with $f: \mathbb{R} \to \mathbb{R}$ is an exemple of such function.
My attempts:
a) I have tried to construct $\phi$ such that $\phi(x)=\lim_{y \rightarrow x} f(y)$ , and then look the range (the range is bounded and "almost" closed), but without success.
b) I have tried "to bind functions" in such sense: if $f$ is continuous at b and $f|{[c,b]}$ and $f|[b,d]$ is uniformly continuous, then $f:[c,d] \to \mathbb{R}$ is uniformly continuous, but without success, cos I cant "bind" indefinitely.
c) I have tried by contradiction, but again without success.
Hint:
Assume $f$ is nondecreasing, and write $I=(q,p)$ where $p$ and $q$ may be infinite. Show that $\lim_{x \to p} f(x) = u$, where $u:=\sup_{x \in I} f(x)$. Similarly show that $\lim_{x \to q} f(x) = v$, where $v := \inf_{x \in I} f(x)$.
Next fix $\epsilon>0$. Choose $M, N \in I$ with $M \geq N$, such that $x\geq M$ implies that $u-f(x)<\epsilon/2$, and such that $x \leq N$ implies that $ f(x)-v < \epsilon/2$. Conclude that $|f(x)-f(y)|<\epsilon/2$ whenever $x,y \in (q, N]$ or $x,y \in [M, p)$.
Since $[N,M]$ is a compact interval, $f$ is uniformly continuous on $[M,N]$, so there exists $\delta>0$ such that for all $x,y\in [M,N]$, if $|x-y|<\delta$ then $ |f(x)-f(y)|<\epsilon/2$.
Conclude that for all $x,y \in I$, if $|x-y|<\delta$ then $|f(x)-f(y)|<\epsilon$.