Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Application and Web Development > PHP

Reply
 
LinkBack Thread Tools Display Modes
Old 04-14-2006, 01:15 AM   #1 (permalink)
Redline
PHP Student
 
Join Date: Oct 2004
Location: Forest Grove, OR
Posts: 150
Redline is on a distinguished road
Send a message via AIM to Redline Send a message via MSN to Redline
Is it possible to check if a resource is available?

I have a playlist table on my blog that requests my current winamp playlist from my computer. Unfortunately if winamp isn't running, or my computer is offline, the page doesn't load. Is there an easy way to check if the resource is available?
__________________
Current Project
Redline is offline   Reply With Quote
Old 04-14-2006, 09:05 AM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,489
sde is on a distinguished road
play around with fopen(). try to open the file, and if you can't, then write a javascript variable to the page to let it know that it should not make your ajax requests.

you might need an '@' sign before fopen to supress any errors it might generate if it can not open the file.

i don't think file_exists() works across the internet. that would be ideal though.
sde is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual C++ 6.0 resource problem dball Platform/API C++ 1 06-10-2005 06:50 AM
javascript: check if file input is undefined sde HTML, XML, Javascript, AJAX 3 03-28-2005 08:15 AM
check for valid image via http sde PHP 6 01-27-2005 04:22 PM
check if session variable is null? sde Java 3 07-07-2004 12:27 PM
How to check if a member is logged in? prendo PHP 4 04-10-2003 08:48 AM


All times are GMT -8. The time now is 08:30 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting