|
Posted by affiliateian on 03/03/07 02:14
> I'm trying to help, but without the information I'm asking for, you make
> it almost impossible to give you a good answer.
Hey Jerry,
First of all, know that your help is really appreciated. Being a
newbie at coding, I am still trying to follow the lingo. Sorry about
missing some info. Let me try it here.
Running this:
<?php
$url=$_SERVER['SCRIPT_URI'];
$file=explode("/",$url);
$filename=$file[(count($file)-1)];
echo $filename . "<br>\n";
echo "<pre>\n";
print_r(file($filename));
echo "</pre>\n";
//$content = implode('', file($filename));
preg_match("/<title>(.*)<\/title>/i", $content, $match);
$title = $match[1];
$link='edited-so-url-displays://www.stumbleupon.com/submit?url='.
$url.'&title='.urlencode($title);
?>
<a href='<?php echo $link;?>'>Link to stumbleupon</a>
Resulting HTML is:
<a href='http://www.stumbleupon.com/submit?url=&title='>Link to
stumbleupon</a>
Want to get this:
<a href='http://www.stumbleupon.com/submit?url=http://www.mydomain.com/
file.html&title=Title of file.html'>Link to stumbleupon</a>
How was that?
Navigation:
[Reply to this message]
|