Quote:
Quote: Originally Posted by greenhybrid
Here's what I was able to achieve with some creative modification of the code:
http://www.greenhybrid.com/
Nice work on the greenhybrid site! Would you mind sharing your PHP parse code -- I'm guessing you used preg_replace() -- to format the source link on the front page?
|
I figured it out... in case anybody was curious. See
PHP function parse_url.
Code:
<?php
$myDomain = parse_url("http://www.yahoo.com/index.php#examples");
echo "Scheme: " . $myDomain["scheme"] . "<br>";
echo "Domain: " . $myDomain["host"] . "<br>";
echo "Path: " . $myDomain["path"] . "<br>";
echo "Anchor: " . $myDomain["fragment"] . "<br>";
?>
RESULT:
Scheme: http
Domain: www.yahoo.com
Path: /index.php
Anchor: examples
You can tweak it from there. Have fun!