Advertisement

04.29.2005 at 02:04PM PDT, ID: 21407774
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

php trim

Asked by pugandjody in PHP Scripting Language

Tags: ,

I'm tring to write this script that will get a file from the internet and trim it... It is a basic text document and it looks like this:

70.176.201.227:6348 24.131.24.172:6348 68.122.10.246:6346 82.4.54.81:45952 70.176.75.65:6348 80.230.135.124:6346 66.244.226.93:6348 129.89.187.156:6348 81.69.113.238:1027 24.93.189.202:9469 69.3.59.182:6349 24.30.114.91:25324 80.62.161.103:6348 24.2.248.13:6346 200.171.79.209:18958 213.47.57.40:6346 24.14.75.217:6349 65.32.166.13:6346 24.76.46.148:6349 24.236.217.96:6349 219.215.132.92:6346 219.50.84.42:6346 206.72.32.35:6348 195.14.223.10:6346 24.251.5.29:6346 142.167.32.172:6346

It has and ip address a comma then a port number...
Here is what I have so far:

<?php
$file = file('http://loot.alumnigroup.org/?hostfile=1');
$random =  rand(1,5);

$output = $file[$random];

$ipandport = trim($output, " \t.");

echo trim($ipandport, " :.");
?>

It randomly picks a line and then it gets just one ip and port from that line using trim...
So an example of an output looks like this:

206.72.32.35:6348

but I want the ip loaded into a string(ex. $ip) and the port loaded into another string(ex. $port)

pleas help!
ThanksStart Free Trial
[+][-]04.29.2005 at 02:06PM PDT, ID: 13898129

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.29.2005 at 02:12PM PDT, ID: 13898167

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.29.2005 at 02:16PM PDT, ID: 13898188

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: PHP Scripting Language
Tags: php, trim
Sign Up Now!
Solution Provided By: Diablo84
Participating Experts: 2
Solution Grade: A
 
 
[+][-]04.29.2005 at 02:20PM PDT, ID: 13898222

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.29.2005 at 03:00PM PDT, ID: 13898471

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.29.2005 at 03:09PM PDT, ID: 13898520

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.2005 at 02:53PM PDT, ID: 14109868

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.21.2006 at 06:41AM PST, ID: 16008937

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.28.2006 at 02:54AM PST, ID: 16063781

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44