Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Need php script to check if url exists
Old 01-08-2010, 11:06 AM Need php script to check if url exists
Skilled Talker

Posts: 90
Trades: 0
I am having problems find a good PHP script that checks to see if a URL exists. Any help would be mush appreciated.
__________________
Free Flash designs and tutorials at
Please login or register to view this content. Registration is FREE

Shorten your URL's with
Please login or register to view this content. Registration is FREE
xuroq is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-08-2010, 11:27 AM Re: Need php script to check if url exists
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://stackoverflow.com/questions/4...for-404-in-php
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-12-2010, 07:01 AM Re: Need php script to check if url exists
Average Talker

Posts: 15
Trades: 0
To use that example on the site you want to make sure your web host supports the function.

Save this into a php file.

Quote:
<?php
If(function_exists("fsockopen")){
echo 'Function Exists';
}
Else{
echo 'function does not exist';
}
?>
Hope it helps
__________________

Please login or register to view this content. Registration is FREE
- Free unlimited automatic website traffic.
cheapdomainsell is offline
Reply With Quote
View Public Profile
 
Old 01-15-2010, 01:21 AM Re: Need php script to check if url exists
freezea's Avatar
Experienced Talker

Posts: 45
Trades: 0
I am using php to check if a URL is available using th if file exists function.

Help with Code Tags PHP Syntax (Toggle Plain Text)
if(file_exists("http://www.domain.jsp")){$lines = file('http://www.domain.jsp');}else{$lines= echo $variable}<strong class="highlight">if</strong>(file_exists("http://www.domain.jsp"))
{
$lines = file('http://www.domain.jsp');
}else{
$lines= echo $variable
}
But it keeps giving me errors...is there an alternative to if file exists?
Thanks

Last edited by chrishirst; 01-15-2010 at 10:59 AM..
freezea is offline
Reply With Quote
View Public Profile
 
Old 01-15-2010, 11:01 AM Re: Need php script to check if url exists
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
And copying and pasting a post from another forum helps because????????

http://www.daniweb.com/forums/thread83076.html

ESPECIALLY ONE THAT OBVIOUSLY DOES NOT WORK!!!!!
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Need php script to check if url exists
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15820 seconds with 12 queries