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.

HTML Forum


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



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 08-02-2005, 09:55 AM Report A Link Code?
MightyMaster's Avatar
Ultra Talker

Posts: 401
Location: Appleton, WI
Trades: 0
I am looking for a code/script that will allow visitors to click on a link to report a bad link. Anyone know where I can find one?
MightyMaster is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-02-2005, 12:38 PM
NuWeb.co.uk's Avatar
NuWeb.co.uk is OFFLINE

Posts: 361
Trades: 0
I am also interested in this.
Maybe very simple to code. Ill have a go for myself later.
NuWeb.co.uk is offline
Reply With Quote
View Public Profile Visit NuWeb.co.uk's homepage!
 
Old 08-04-2005, 09:29 AM
MightyMaster's Avatar
Ultra Talker

Posts: 401
Location: Appleton, WI
Trades: 0
BUMP!! Anyone have any clues?
MightyMaster is offline
Reply With Quote
View Public Profile
 
Old 08-04-2005, 12:55 PM
Mooofasa's Avatar
Defies a Status

Posts: 1,611
Name: Michael (mik) Land
Location: England
Trades: 0
You might find it easier if you asked in the php section or check out hotscripts.com for "report a broken link".
__________________

Please login or register to view this content. Registration is FREE
- Tumblog with thoughts, quotes, links, videos, images and my creations.

Please login or register to view this content. Registration is FREE
- The best free web browser.

Please login or register to view this content. Registration is FREE
- Firefox is now Firefail.
Mooofasa is offline
Reply With Quote
View Public Profile Visit Mooofasa's homepage!
 
Old 08-04-2005, 12:59 PM
Rufo's Avatar
Extreme Talker

Posts: 173
Trades: 0
Assuming you're using PHP and MySQL, simply create a new field in your database called, for example, 'bad', then use a simple script such as this to flag bad links as such:

PHP Code:
if($id = (int) $_GET['id']) {
   
mysql_query('UPDATE `tablename` SET `bad` = 1 WHERE `id` = $id');
   echo 
'Bad link reported.';
}
else {
   echo 
'Error: you must specify a link to report as bad.';

Invoke using a link like this:
HTML Code:
<a href="reportbad.php?id=123">Report bad link</a>
You may also wish to store information such as IP address / username, to minimise abuse.
Similar techniques could be used in other languages such as ASP.
__________________

Please login or register to view this content. Registration is FREE
Rufo is offline
Reply With Quote
View Public Profile Visit Rufo's homepage!
 
Old 08-04-2005, 01:00 PM
Rufo's Avatar
Extreme Talker

Posts: 173
Trades: 0
When you (the admin) wish to view the links which have been reported, simply do:
Code:
SELECT FROM `tablename` WHERE `bad` = 1;
__________________

Please login or register to view this content. Registration is FREE
Rufo is offline
Reply With Quote
View Public Profile Visit Rufo's homepage!
 
Old 08-04-2005, 01:44 PM
NuWeb.co.uk's Avatar
NuWeb.co.uk is OFFLINE

Posts: 361
Trades: 0
how about:
Code:
<?php
$to = "mail@me.com";
$subject = "Dead Link";
$body = "Game $id is broken";
if (mail($to, $subject, $body))
{
   echo("<p>Dead Link Reported</p>");
}
else
{
   echo("<p>Failed to be reported</p>");
}
?>
Do that on click .. so the submit button is, like "Report This File As Dead"
Or whatever .. (took 2 seccons to code, someone check it, probably wrong)
NuWeb.co.uk is offline
Reply With Quote
View Public Profile Visit NuWeb.co.uk's homepage!
 
Reply     « Reply to Report A Link Code?
 

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.51756 seconds with 12 queries