yeahz Posted February 22, 2011 Report Share Posted February 22, 2011 (edited) Ir šāds links (tas ir pašlaik ieslēgtais, kas rādās browserim augšā): http://krutalapa.lv/?b=18&url=http://links.lv/download.php?id=1831&name=SuperDuperNosaukums kā lai nolasa visu $_GET['url'] ? Pagaidām viņš nolasa tikai tik daudz - http://links.lv/download.php?id=1831 un tālāk nogriež visu pārējo, jo tālāk seko &. Edited February 22, 2011 by yeahz Quote Link to comment Share on other sites More sharing options...
daGrevis Posted February 22, 2011 Report Share Posted February 22, 2011 $_SERVER, strPos() + subStr(). =] Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted February 22, 2011 Report Share Posted February 22, 2011 Ja taa ir tava lapa un tu padod taadu GET parametru, tad eskeipo to URLi un tikai tad liec vinju GETaa... Quote Link to comment Share on other sites More sharing options...
codez Posted February 22, 2011 Report Share Posted February 22, 2011 Kad veido linku, tad parametri, kuri var iekļaut speciālos simbolus, ir jāeskeipo ar http://php.net/manual/en/function.urlencode.php Quote Link to comment Share on other sites More sharing options...
yeahz Posted February 22, 2011 Author Report Share Posted February 22, 2011 Kad veido linku, tad parametri, kuri var iekļaut speciālos simbolus, ir jāeskeipo ar http://php.net/manual/en/function.urlencode.php Tieši tas, kas vajadzīgs, paldies. :) Quote Link to comment Share on other sites More sharing options...
yeahz Posted February 22, 2011 Author Report Share Posted February 22, 2011 (edited) vēl viena lietiņa - kā lai šajā funkcijā tikai url parametru pārtaisa ar urlencode()? function makeClickableLinks($text, $bump_id) { $text = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '<a target="_blank" href="/click/?b='.$bump_id.'&url=\\1">\\1</a>', $text); $text = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '\\1<a target="_blank" href="/click/?b='.$bump_id.'&url=http://\\2">\\2</a>', $text); return $text; } Ja kas, tad funkcija pārtaisa linkus, piemēram, ja es ierakstu vienkārši linku http://www.adrese.lv/ tad funkcija arī pārtaisīs tā, lai šis teksts parādās kā links. Vienīgais šeit to tā nevar parādīt, jo forums pārtaisa to, tieši tāpat kā es vēlos. Edited February 22, 2011 by yeahz Quote Link to comment Share on other sites More sharing options...
yeahz Posted February 23, 2011 Author Report Share Posted February 23, 2011 neviens nezin? Quote Link to comment Share on other sites More sharing options...
daGrevis Posted February 23, 2011 Report Share Posted February 23, 2011 Es zinu, ka vajag izmantot preg_x nevis eregi_x un arī zinu, ka Man slinkums Tavā vietā iedziļināties Tavā "regex'ā"! =) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.