Jump to content

infowire

New Members
  • Posts

    6
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

infowire's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i found the first problem, my stupidity. Calling for $ when they have not been defined yet. Now it downloads example.jpg and it can't display...
  2. Hello, i have a question, why do my variables $ don't work here? How to get them to work ? if(isset($_POST['click'])) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header("Content-Disposition: attachment; filename=" . $orig); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); echo $link_download; ob_clean(); flush(); echo file_get_contents($link_download); };
  3. that works great, only for some reason the urls look like this : http://www.abt.com/product/40536/Friedrich-P12A.html%3C/a%3E it adds the </a> at the end of the url. EDIT I figured it out, i had to remove the </a> from my code.
  4. How can i implement that into my code i have ?
  5. Hello, I have a function that turns any link within a variable into an HTML clickable link but the link looks like a full link, what i would like this function to do is to take the name of the domain without the HTTP and www just the site name and make the Link be that name. So instead of my links looking like this: http://www.somesite.com i want them to look like this "somesite" and that would be a clickable link. Or a better idea would be somehow grab the links page title and use that for the <a href = "urlhere"> Page Title/Site Title </> function make_clickable($text) { $ret = ' ' . $text; $ret = preg_replace("#(^|[\n ])([\w]+?://[\w]+[^ \"\n\r\t<]*)#ise", "'\\1<a href=\"\\2\" >\\2</a>'", $ret); $ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#ise", "'\\1<a href=\"http://\\2\" >\\2</a>'", $ret); $ret = preg_replace("#(^|[\n ])([a-z0-9&\-_\.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $ret); $ret = substr($ret, 1); return($ret); }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.