Php > Code Snippets
Display all links on a web page
Display all links on a web page $page = 0; $URL = "http://example/"; $page = @fopen($URL, "r"); print("Links at $URL
\n"); print("
\n"); while(!feof($page)) { $line = fgets($page, 255); while(eregi("HREF=\"[^\"]*\"", $line, $match)) { print("
"); print($match[0]); print("
\n"); $replace = ereg_replace("\?", "\?", $match[0]); $line = ereg_replace($replace, "", $line); } } print("
\n"); fclose($page); ?>
Php Codes
Algorithms
Arrays
Authentication
Calendar
Code Snippets
Programs
Content Manage
Contest Related
Cookies
Credit Cards
DBase Related
Databases
Date Time
Directories
E-Mail
Errors
File
File System
Forms
Handling
Graphics
HTML and PHP
Informix
Ingres
InterBase
LDAP
Look and Feel
Miscellaneous
MySQL
Other
PHP Classes
Searching
Navigation
Statistics
Strings
User Manage