this code is strange !


Posted on 16th Feb 2014 07:03 pm by admin

Hi i got this code from the web.. It checks for live and dead socks
It is working perfectly on my localhost. but does not work in any webserver ! any ideas ?


<?php
$filename = "proxies.txt"; //or a localpath.
$rel=file_get_contents($filename);
$ipset = explode("n",$rel); // explode it based on your delimiter.
foreach($ipset as $ips)
{
$ipandport=explode(':',$ips);
//Porxy string format might be 123.156.189.112:8080
$host=$ipandport[0];
$i=(int)$ipandport[1];
$fp = @fsockopen("tcp://".$host,$i,$errno,$errstr,10);
// tcp:// because, socks4 uses TCP and socks5 uses TCP & UDP
if($fp)
{
echo("Result is $fp");
echo ("port " . $i . " open on " . $host . "");
fclose($fp);
}
flush();
}
?>


Waiting for replies....

No comments posted yet

Your Answer:

Login to answer
255 Like 10 Dislike
Previous forums Next forums
Other forums

Get word number x from string?
How can I use a function to loop through a string, and "have a look at" every word in the

Is it a good practice to store user info. in sessions?
I am making a user class for my script which stores all the user information in sessions. It takes u

Need help to identify this error please
:confused:Can anyone help me tell what this error message means? Maybe tell me where to look to fix

how to remove in php string display
My code is $message="We're looking at developing our website."; $body= "My mess

printing links
Hi every1

i am connecting to a table in sql and the looping through with a while ($ var = my

How to disable direct access to a file
Suppose I've 2 Files. 1.php & 2.php

I don't want anybody to access 2.php directly fr

Beginner PHP code help
Hi I'm new to php but if someone could please read the question below and help it would be great.

SAP FICO learning materials
Hi all,
I am new to this world of SAP FICO. I have taken training on SAP FICO, but was wonderin

help with image upload code
Hello,

right now this code I have resizes images and then places them into the uploads folder

DateObject and Nulls
Hi all,

I have an array mapped to a value object. One of the items in the array is a PHP Date

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash