473,395 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Hello, i have ipcam and i try to check when is online or offline, but always i get of

Hello, i have ipcam and i try to check when is online or offline, but always i get offline message. i use the follow code.
Please can u help if i have something wrong.

Expand|Select|Wrap|Line Numbers
  1. $ip="XXXX"; //DNS Cam
  2. $port=XXXX;//Cam port
  3.  
  4. function getStatus($ip,$port)
  5. {
  6.   $socket = @fsockopen($ip, $port, $errorNo, $errorStr, 3);
  7.    if(!$socket) return "offline";
  8.  
  9.    else    return "online";
  10. }
  11.  
  12. echo getStatus($ip , $port);
Apr 13 '15 #1
0 1135

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Stefan Behrens | last post by:
Hi, i try get information about the online or offline status of a database within ms-sql srv 2000. I can look it up within server manager, but I'm looking for a way to get this information...
1
by: Moti | last post by:
Hello, I am trying to check the integrity of SQL database. The 'problem' with SQL server is that it's fixing the DB automatically after restore so I need a way to do it offline, much like using...
1
by: DMina | last post by:
Hello there, I have a user who can bring offline a database but he cannot bring the database back online. The error which pops up is: Error5011: User does not have permission to alter...
5
by: ajordan | last post by:
hello! i think i have a bug when i use parseFoat function: i have the following operation : parseFloat("10.664062") + parseFloat("10.664062") +parseFloat("10.664062"); the result of...
1
by: Eli | last post by:
Hi, I've created a dynamic IFRAME and inserted it in the document. Then I changed the src property to some URL (not the same domain as the main document). I want to check when the IFRAME is...
3
by: kotori | last post by:
I'm trying to develop a program in C# that will change 'label1' in my form to "online" if a server is present on 127.0.0.1:8080 and "offline" if it is not. I was playing around with this:...
1
by: PythonNotSoGuru | last post by:
Hi everyone i was just wondering if there is anyway to have python check for a specific word or phrase in a raw input value. If you could please provide a small example code chunk to help me along...
10
by: Php Developer | last post by:
I want to know how to check that user is online or offline status if he close his browser with the help of <body onunload>.As it not work well if is user change his page as that time it is too...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.