Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.
Daily Diamond

How to clean this?

Status
Not open for further replies.
T

tekz999

Guest
I have a list of list like this below:

1. proxy.xmission.com:8080
2. host54.nokia-boston.com:8080
3. 66.35.211.141:80
4. client-220-254.bhm.pogozone.net:3128
5. client-220-253.bhm.pogozone.net:3128
6. c-24-21-35-9.hsd1.or.comcast.net:8080
7. bess-proxy2.miamiarch.org:3128
8. bess-proxy.miamiarch.org:3128
.
.
.


I dont want the "1." "2." "3."... numbers in front, I am looking for a script to clean those numbers, anyone has any idea how to do that? :huh: d:)
 
Domain Days 2024

Arsenik

Level 5
Legacy Platinum Member
Joined
Dec 14, 2003
Messages
261
Reaction score
0
Heres a 5 minutes script i did for you. (2 files: form.html and split.php)

Content of form.html
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Split Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="form" method="post" action="split.php">
  <textarea name="list" cols="50" rows="15"></textarea>
  <br>
  <input name="submit" type="submit" value="SplitZor">
</form>
</body>
</html>

Content of split.php:
PHP:
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
       <title>Split!</title>
</head>
<body>
<?php
$blocks = $HTTP_POST_VARS['list'];
$items = explode("\n", $blocks);

foreach ($items as $proxies) {
    $proxy = explode(" ", $proxies);
    echo "$proxy[1] <br>";
}
?>
</body>
</html>

This will convert your list of items from 1. proxy.xmission.com:8080 to proxy.xmission.com:8080 for example.

Code:
1. proxy.xmission.com:8080
2. host54.nokia-boston.com:8080
3. 66.35.211.141:80
4. client-220-254.bhm.pogozone.net:3128
5. client-220-253.bhm.pogozone.net:3128
6. c-24-21-35-9.hsd1.or.comcast.net:8080
7. bess-proxy2.miamiarch.org:3128
8. bess-proxy.miamiarch.org:3128
Code:
proxy.xmission.com:8080 
host54.nokia-boston.com:8080 
66.35.211.141:80 
client-220-254.bhm.pogozone.net:3128 
client-220-253.bhm.pogozone.net:3128 
c-24-21-35-9.hsd1.or.comcast.net:8080 
bess-proxy2.miamiarch.org:3128 
bess-proxy.miamiarch.org:3128
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members Online

Sedo - it.com Premiums

IT.com

Premium Members

Premium Members

MariaBuy

Our Mods' Businesses

UrlPick.com

*the exceptional businesses of our esteemed moderators

Top Bottom