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
Old 12-20-2002, 11:22 AM   #1 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
using external content

im using content on one of my sites that pulls from an external server.

sometimes that external server's httpd service isn't working that great.

is there a way to test for a page before trying to read it? i can do a file_exists, but the problem is that i don't want to make them wait until it times out. i want it to print an error after about 5 seconds of the external server not responding.

any ideas?
sde is offline   Reply With Quote
Old 12-20-2002, 11:35 AM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
ok .. here would be another solution ..

is there any way in php to check to see if an ip is valid? ping it somehow or something like that?
Code:
if(server_id_valid())
{
  execute this;
}
else
{
  echo "info not available";
}
sde is offline   Reply With Quote
Old 12-20-2002, 02:03 PM   #3 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
hmmm.. i would like to know if there is a way to have it timeout after 2 seconds?
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 12-20-2002, 02:37 PM   #4 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
it would be cool if php had some built-in timer functions where you could keep looping to check if a file has been detected until the specified time of the end of the loop.

something like this:

Code:
while($start_time < $end_time)
{
  check for file; // but keep looping while still checking the file
  
  if(file is found)
  {
    $end_time==$start_time;
  }
}
sde is offline   Reply With Quote
Old 12-20-2002, 03:02 PM   #5 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
that would work perfect.

please do that for me mike.

thanks.
__________________


Urban Clothing
Admin 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
Breaking out of external loop agh Standard C, C++ 7 04-30-2003 08:03 PM
Table problems prendo HTML, XML, Javascript, AJAX 12 04-06-2003 05:38 AM


All times are GMT -8. The time now is 06:47 PM.


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