Question: While installing `oracle-java7-installer` via `ppa:webupd8team/java` repository, I see the following error:

```
dpkg: error processing /var/cache/apt/archives/oracle-java7-installer_7u25-0~webupd8~1_all.deb (--unpack):
 trying to overwrite '/usr/share/applications/JB-java.desktop', which is also in package oracle-java6-installer 6u37-0~eugenesan~precise1
Errors were encountered while processing:
 /var/cache/apt/archives/oracle-java7-installer_7u25-0~webupd8~1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

```

Do I need to delete the file `/usr/share/applications/JB-java.desktop` manually to make this installation work?

Answer: 
```
$url = 'http://www.example.com/example.jpg)';
print_r(get_headers($url));

```

It will give an array. Now you can check the response to see if image exists or not
You need to check that the file is exist regularly on server or not.you should used:

[is\_file](http://php.net/manual/en/function.is-file.php) .For example

$url="http://www.example.com/example.jpg";

```
if(is_file($url))
{
echo "file exists on server";
}
else
{
echo "file not exists on server ";
}

```