Seeo Posted March 28, 2008 Share Posted March 28, 2008 Hello guys, I need some help editing this When I generate Links with this, I get something like http://www.somesite.com/rs174.49076075/dl/somefile.rar Notice that there is a dot after rs174, what i want to do is replace "." with this "/", So Can anybody help me, well here is the script <title>MOBiES RS Auto Remote System</title> <br> <br> <body text=black bgcolor=#c0c0c0><big><big><center><b>MOBiES RS Auto Remote System</big></big><br></b><br><br></center> <?php error_reporting(E_ALL ^ E_NOTICE); ?> <? $rslinks = $_POST["rslinks"]; if($rslinks=="") { echo " <form method=post> <center><font color=green><b>Enter RapidShare Links [ Username:Auto ][ Password:Auto ]</b></font><br><textarea rows=20 cols=80 name=rslinks></textarea><br></center> <center><input type=submit value='Generate'></form></center> <center><br><b><font color=green>Copyright 2008. MOBiES RS Auto Remote System, MOBiES. All rights reserved.</font></b></center>"; exit(); } else { $user = $_POST["user"]; $pass = $_POST["pass"]; $rslinks=$rslinks."\n"; $rslinks=urldecode($rslinks); $rslinks=eregi_replace("http\://","",$rslinks); $linkzz=explode("rapidshare.com/files",$rslinks); $time=date('l dS \of F Y h:i:s A'); foreach($linkzz as $key => $rslink) { $nfo=explode("/",$rslink); $nfo=array_reverse($nfo); $filenum=$nfo[1]; $filename=$nfo[0]; $filename=eregi_replace(".html","",$filename); $heck=file("http://rapidshare.com/files/$filenum/$filename"); $hek=implode("",$heck); if(eregi("<script>alert",$hek)) { $dead="<font color=red>DEAD!</font>"; } else { $dead=""; } $link=""; $http="http"; $huk=explode("http://rs",$hek); $hok=explode("rapidshare",$huk[1]); $link=$dead; $link=$link.$http; $link=$link.'://'; $link=$link.'www.somesite.com/'; $link=$link.''; $link=$link.''; $link=$link.'rs'; $link=$link.$hok[0]; $link=$link.''; $link=$link.$filenum; $link=$link.'/dl/'; $link=$link.$filename; //$link= $http."://".$user.":".$password."@rs" $hok[0] "rapidshare.com:80/files/" $filenum."/dl/".$filename; if($filename=="") { } else { $links[$filename]=$link;} } ksort($links); echo "<center><font color=green><b>Results</b></font></center>:<hr><blockquote><pre>Checked with MOBiES RS Auto Remote System - $time:\n\n"; foreach($links as $key => $link) { echo "$link"; } echo "\n\nMOBiES RS Auto Remote System - All rights Reserved.</blockquote><hr>"; } ?> please help me with this script.. Link to comment https://forums.phpfreaks.com/topic/98383-plz-help-replacing/ Share on other sites More sharing options...
darkfreaks Posted March 28, 2008 Share Posted March 28, 2008 <?php str_replace(".","/",$rslinks); ?> Link to comment https://forums.phpfreaks.com/topic/98383-plz-help-replacing/#findComment-503485 Share on other sites More sharing options...
BlueSkyIS Posted March 28, 2008 Share Posted March 28, 2008 ^ would replace all . with / it looks like the dot is coming from $hok[0], so you should only need to str_replace there: $link=$link.str_replace('.','/',$hok[0]); Link to comment https://forums.phpfreaks.com/topic/98383-plz-help-replacing/#findComment-503495 Share on other sites More sharing options...
darkfreaks Posted March 28, 2008 Share Posted March 28, 2008 i think barrand is correct Link to comment https://forums.phpfreaks.com/topic/98383-plz-help-replacing/#findComment-503496 Share on other sites More sharing options...
Seeo Posted March 28, 2008 Author Share Posted March 28, 2008 hey guys, I tried it but it doesn't work...I'm a total newbie, maybe the line where I put it is wrong, so can u help me? Link to comment https://forums.phpfreaks.com/topic/98383-plz-help-replacing/#findComment-503503 Share on other sites More sharing options...
Seeo Posted March 28, 2008 Author Share Posted March 28, 2008 hey guys, I tried it but it doesn't work...I'm a total newbie, maybe the line where I put it is wrong, so can u help me? Well, I figured it out, Now it works fine, All thanks to you guys! omg! I'm really a noob...lol Link to comment https://forums.phpfreaks.com/topic/98383-plz-help-replacing/#findComment-503513 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.