WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Mobile Dev World

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Grab links from a page
Categories : PHP, Regexps, HTTP Click here to Update Your Picture
glen mc arthur
Date : Nov 18th 2005
Grade : 2 of 5 (graded 6 times)
Viewed : 8758
File : No file for this code example.
Images : No Images for this code example.
Search : More code by glen mc arthur
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

<?
$page
= 0;
$URL = "http://www.beginnersphp.co.uk/";
$page = @fopen($URL, "r");
print(
"Links at $URL<BR>\n");
print(
"<UL>\n");
while(!
feof($page)) {
   
$line = fgets($page, 255);
    while(
eregi("HREF=\"[^\"]*\"", $line, $match)) {
        print(
"<LI>");
        print(
$match[0]);
        print(
"<BR>\n");
       
$replace = ereg_replace("\?", "\?", $match[0]);
       
$line = ereg_replace($replace, "", $line);
    }
}
print(
"</UL>\n");
fclose($page);
?>



Gets the browser and OS from the $_SERVER['http_user_agent'] variable in PHP
Categories : PHP, HTTP, Regexps
PHP Domain Availability Checker
Categories : PHP, Complete Programs, Regexps, HTTP, Sockets
How to strip non-alpha characters from a string
Categories : Regexps, PHP
IP Blocking
Categories : PHP, Security, HTTP
Get the AppStore Ranking for any iPhone App
Categories : PHP, Web Services, Regexps
Produces browser-safe strings while preserving HTML tags.
Categories : Strings, HTTP, PHP, HTML and PHP
Identify and log search engine access (spiders, robots, etc.) to a page.
Categories : HTTP, Environment Variables, PHP, MySQL, Databases
A simple script to count and report hits and the last modification time of an HTML page. Requires MySQL support (other DBs should work too, except possibly mSQL).
Categories : HTTP, MySQL, PHP, Databases
Newbie Notes #7 - Ridiculous regex
Categories : PHP, Beginner Guides, Regexps
grab the result of any calculation you submit to the Google Calculator.
Categories : PHP, Arrays, Web Services, Regexps, Math.
Check if a file exists on a remote FTP server with PHP
Categories : PHP, FTP, Regexps
Class that allows the PHP developer to create and manage UNIX like password files suitable for use as Apache authentication password files.
Categories : HTTP, PHP, PHP Classes, Filesystem
The GTV.class allows you to extract a value between any HTML tag or between any TEXT on a web page.
Categories : PHP, PHP Classes, Regexps
validateEmail 2.0 - upgraded version of the old validateEmail function used to validate email addresses via SMTP and regex.
Categories : Email, Regexps, PHP
BBCode Formatting String
Categories : PHP, HTML, Regexps, Arrays
 Tim N wrote :1689
Please take a look at the function posted by
"max99x [at] gmail [dot] com" at http://de.php.net/preg_match/.
Your function does not get the links Javascript import links, CSS links, and the regular URL/SRC HTML links.