[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 03-20-2006, 11:25 AM   #1 (permalink)
Soon to be RICHdoggie!
 
PoorDoggie's Avatar
 
Join Date: Jan 2005
Location: UK
Posts: 2,390
316.50 NP$ (Donate)

PoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nice


Test website exists in PHP

I have tried the file_exists() function, but it doesn't seem to work with external websites. Is there anyway I can see if an external website (www.thiswebsite.com/scrpt.php?a=asd) exists?

Thanks
Tom
PoorDoggie is offline  
Old 03-20-2006, 11:47 AM   #2 (permalink)
Recovering Jerk

Forum Moderator

 
labrocca's Avatar
 
Join Date: Aug 2004
Location: Las Vegas
Posts: 5,498
1,196.64 NP$ (Donate)

labrocca has a reputation beyond reputelabrocca has a reputation beyond reputelabrocca has a reputation beyond reputelabrocca has a reputation beyond reputelabrocca has a reputation beyond reputelabrocca has a reputation beyond reputelabrocca has a reputation beyond reputelabrocca has a reputation beyond reputelabrocca has a reputation beyond reputelabrocca has a reputation beyond reputelabrocca has a reputation beyond repute

Child Abuse Child Abuse
curl
labrocca is online now  
Old 03-20-2006, 12:32 PM   #3 (permalink)
Soon to be RICHdoggie!
 
PoorDoggie's Avatar
 
Join Date: Jan 2005
Location: UK
Posts: 2,390
316.50 NP$ (Donate)

PoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nice


Quote:
Originally Posted by labrocca
curl
hmm... thanks, but how would I use that?

Thanks
Tom
PoorDoggie is offline  
Old 03-20-2006, 12:44 PM   #4 (permalink)
NamePros Regular
 
Noobie's Avatar
 
Join Date: Feb 2006
Location: Montreal, Quebec, Canada
Posts: 324
66.75 NP$ (Donate)

Noobie is on a distinguished road


http://ca.php.net/curl

PHP Code:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://my.domain.com/my_url.php" );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,10); //added
$result= curl_exec($ch);
if (empty(
$result))
{
    echo
"doesn't exist";
}
else
{
    echo
"exists";
}
__________________
Goldkey.com is a scam
What's your BMI? | Timestamp Generator

Last edited by Noobie; 03-20-2006 at 12:54 PM.
Noobie is offline  
Old 03-20-2006, 12:55 PM   #5 (permalink)
Soon to be RICHdoggie!
 
PoorDoggie's Avatar
 
Join Date: Jan 2005
Location: UK
Posts: 2,390
316.50 NP$ (Donate)

PoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nicePoorDoggie is just really nice


thanks everyone!
PoorDoggie is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 04:26 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85