TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 04-21-2009, 12:01 PM   #1 (permalink)
The Contributor
 
oMIKEo's Avatar
 
Join Date: Jan 2008
Location: Leeds
Posts: 52
Thanks: 7
oMIKEo is on a distinguished road
Default Directory site maintenance

Hi guys,

I am working on a directory site and am trying to find out the best ways to maintain it.

What i would ideally like it to be able to run a script that checks to see if a url still works. The only way i would know to do that is to fopen code of the url and run through it to make sure 404 or similar error codes are not found but i don't think that's very accurate! Any other ideas?

My second question is that it would be nice to automatically take a screenshot of the site being added to the directory to use as a thumbnail. Is this possible with php?

Thanks!
Send a message via MSN to oMIKEo
oMIKEo is offline  
Reply With Quote
Old 04-21-2009, 12:29 PM   #2 (permalink)
Jim
The Addict
 
Jim's Avatar
 
Join Date: Nov 2007
Location: the Netherlands
Posts: 281
Thanks: 2
Jim is on a distinguished road
Default

There are quite many screenshot services around my friend:
http://www.google.nl/search?hl=nl&cl...G=Zoeken&meta=

About the online check... You can easily check this kind of stuff with cURL or something. Don't know if thats the most ideal solution tho. I'm sure Kalle knows how to do it the fastest way. :)
__________________
Nunchaku! Who doesn't like martial arts? =)
Send a message via MSN to Jim Send a message via Skype™ to Jim
Jim is offline  
Reply With Quote
Old 04-21-2009, 01:02 PM   #3 (permalink)
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

What makes you think pinging the site for a response wouldn't be accurate?

As for screenshots, there are a bunch of easy to use web services out there for your application to hook into. Or you could create your own screenshots if you want to face the technical hurdles.
Salathe is offline  
Reply With Quote
Old 04-21-2009, 01:28 PM   #4 (permalink)
Jim
The Addict
 
Jim's Avatar
 
Join Date: Nov 2007
Location: the Netherlands
Posts: 281
Thanks: 2
Jim is on a distinguished road
Default

Quote:
Originally Posted by Salathe View Post
What makes you think pinging the site for a response wouldn't be accurate?
You can't check if a file exists using ping, you can only see if the host is online.
__________________
Nunchaku! Who doesn't like martial arts? =)
Send a message via MSN to Jim Send a message via Skype™ to Jim
Jim is offline  
Reply With Quote
Old 04-21-2009, 07:39 PM   #5 (permalink)
The Addict
 
Enfernikus's Avatar
 
Join Date: Jun 2008
Posts: 335
Thanks: 2
Enfernikus is on a distinguished road
Default

Why not just used cURL and check the returned headers?
Enfernikus is offline  
Reply With Quote
Old 04-22-2009, 06:42 PM   #6 (permalink)
The Frequenter
Zend Certified 
 
Join Date: Sep 2007
Location: Denmark
Posts: 352
Thanks: 8
Kalle is on a distinguished road
Default

As said, I think the cURL multi interface might be worth a short here (curl_multi_* function family). Too bad theres no thread support in PHP, else it would all have been alot faster here :(
__________________
Send a message via MSN to Kalle Send a message via Skype™ to Kalle
Kalle is offline  
Reply With Quote
Old 04-22-2009, 09:20 PM   #7 (permalink)
The Contributor
 
oMIKEo's Avatar
 
Join Date: Jan 2008
Location: Leeds
Posts: 52
Thanks: 7
oMIKEo is on a distinguished road
Default

Ok thanks guys will look for some examples of cURL and try and get something working.
Send a message via MSN to oMIKEo
oMIKEo is offline  
Reply With Quote
Reply



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

Advanced Search
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

vB 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
[How To] Allow / Disallow Directory Browsing dynaweb Tips & Tricks 6 04-14-2009 12:57 PM
Pulling values from one site as reference 9three Absolute Beginners 4 02-17-2009 02:37 PM
How to make an RSS aggregator site ? vuthcam Advanced PHP Programming 1 02-03-2009 10:12 PM
Gaming Site Redux obolus Show Off 3 02-25-2008 09:52 PM
Recently rebuilt site obolus Show Off 6 10-30-2007 02:24 AM


All times are GMT. The time now is 06:18 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design