# Capture device details from web url/web page



## firstoptiontrupti (Mar 16, 2016)

Is there is any way to capture device information like device model, operating system, phone number etc. from a web url/web page, using any of the following languages: PHP, JS, JQuery, Ajax


----------



## JiminSA (Dec 15, 2011)

I have found Mobile Detect (written in PHP) to be very useful ...
You could try the following PHP code (untested) for 1) all the HTTP headers and 2) the phone number ...

```
<?php
$headers = apache_request_headers();
// 1) The following will show ALL available headers
foreach ($headers as $header => $value) {
echo "$header: $value 
\n";
}
// 2) The following will show the phone number, if available
foreach ($headers as $header => $value) {
    if ($header == 'x-up-calling-line-id') {
        $phone_number = $value;
        break;
    }
}
if (isset($phone_number)) {
    echo "

Your phone number is:

[B][SIZE=15]$value[/SIZE][/B]

Did you know that this number is sent to [B]every[/B] website you visit (when not using Wi-Fi)?

";
} else {
    echo '

No phone number found. Make sure Wi-Fi is turned off and [URL=./]try again[/URL].

';
}
?>
```


----------

