Guest Drizzle Posted March 21, 2010 Posted March 21, 2010 Well basically, Ive seen how myspace and facebook and everything replace links with validation urls, basically i want to be able to make the same kind of effect. Can anyone help me? Quote
seanybob Posted March 21, 2010 Posted March 21, 2010 I'd suggest something like so: out.php <?php //cleanse input with some function $url = clean($_GET['url']); print" Note! You clicked a link that is taking you off-site to $url To continue, <a href=$url>click here</a> "; ?> Then in your user input that may contain links to outside scripts, do something like: $usertext = str_replace("http://", "out.php?url=http://", $usertext); Since, to get a user to click a link that leads out of your domain, it has to have the http (I believe). If they just made a link in a private message something like <a href=mwg.com>click me</a> that would direct them to http://mygame.com/mwg.com Just for starters. Somebody else will make this more elegant. Quote
Guest Drizzle Posted March 22, 2010 Posted March 22, 2010 Thanks it helps a little but not quite what im looking for. Quote
Zero-Affect Posted March 25, 2010 Posted March 25, 2010 Well what seany said and with scripts they basically filter the inputs and switch a url with the out.php?url=link simple really could use it on the bbcode praser in MCC. Quote
Guest Drizzle Posted March 26, 2010 Posted March 26, 2010 what im trying to get at is like how would i be able to turn the url into an id instead of the regular url? Quote
Dayo Posted March 26, 2010 Posted March 26, 2010 the only way i could think of is if you insert a db entry then pull the url off that what tbh is not needed Quote
a_bertrand Posted March 26, 2010 Posted March 26, 2010 why would you need an id? And what's really the end goal of it? Quote
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.