Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > PHP / mySQL

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 09-13-2011, 01:42 AM   #1
wryfhk22
Registered User
 
Join Date: Mar 2011
Posts: 267
Link Error Checking

Is there a way to check to see if a link comes up with an error and if so then load an alternate link?

For example, say I have a link to a file on another server, if that link is down, can it then load the alternate link?
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
wryfhk22 is offline   Reply With Quote

Old 09-15-2014, 06:34 PM   #3
boysingh
Registered User
 
Join Date: Jul 2014
Posts: 40
Quote:
Originally Posted by project View Post
Bad Links
These are not actually useful, it's not related to the question that was asked.
boysingh is offline   Reply With Quote
Old 10-04-2014, 02:54 PM   #4
Beagle123
Registered User
 
Join Date: Oct 2014
Location: Los Angeles
Posts: 11
You would need to write the code in php to download the header for the webpage, then if it returns a "not found" (404?) error message, have your php script spit out the alternate link. This will be very slow. You may not want to do it. I'd look for an alternative unless this is really low-volume e.g. for your personal use.
__________________
My current business site written in php:


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Beagle123 is offline   Reply With Quote
Old 10-09-2014, 11:08 PM   #5
softech
Registered User
 
Join Date: Oct 2014
Posts: 1,401
You would need to write the code in php to download the header for the webpage, then if it returns a "not found" (404?) error message.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
softech is offline   Reply With Quote
Old 10-09-2014, 11:19 PM   #6
ledtubelight
Registered User
 
Join Date: Aug 2014
Location: Surat
Posts: 847
thanks for the links
__________________
I am SEO expert and handling SEO for following words
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ledtubelight is offline   Reply With Quote
Old 10-20-2014, 04:35 AM   #7
alirezador
Registered User
 
Join Date: Oct 2014
Posts: 1
hi
please use fopen command to check 404 link
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
alirezador is offline   Reply With Quote
Old 10-27-2014, 10:44 PM   #8
StuartSpindlow1
Registered User
 
Join Date: Jun 2014
Location: United Kingdom
Posts: 120
Yeah you can use the fopen command to check link error.
StuartSpindlow1 is offline   Reply With Quote
Old 11-09-2014, 06:50 PM   #9
duclv
Registered User
 
Join Date: Nov 2014
Posts: 3
May be none
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
duclv is offline   Reply With Quote
Old 07-09-2015, 05:37 AM   #10
code9
Registered User
 
Join Date: Jul 2015
Posts: 7
use online back link checker tools and solve your issues
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
code9 is offline   Reply With Quote
Old 08-20-2015, 05:34 AM   #11
rikshaw
Registered User
 
Join Date: Aug 2015
Location: dhaka
Posts: 19
Post Link error checking

You can use different tools like w3cvalidator, link checker, etc to fix your link error.
rikshaw is offline   Reply With Quote
Reply


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

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 Off
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:11 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.