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 ?


Did you know?Explore Trending and Topic pages for more stories like this.
<?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

Streaming local file from PHP while it’s been written to by a CURL process
I am creating a simple Proxy server for my website. Why I am not using mod_proxy and mod_cache is a

SOAP Issue
Hi,

I am facing some understanding problem with SOAP basic.kindly recommend some SOAP expert.

How do I replace any number of character occurences with one occurrence?
How do I replace any number of character occurences with one occurrence?

Let's say I have:

iMatch stored value with the current value in a loop
Hello,

I have a MySQL db were I store articles in.

I have a form to fill these article

how to make database item unique
Hey guys,

is it possible to do this:

I have the database item $title being pulled for

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

On page view, minus credit
Hello all, please, I need a little help with this script. I am charging one credit (credits can be p

read integers that returns a negative or prints the average
Im trying to finish this homework assignment by tommarow afternoon and I keep getting stuck.
Wr

How To Make More Than One Redirection with PHP on the same page?
Hey im trying to do a direction page where it open differently link direction pages every time som

login form can you find my error?
registrationform.php seems fine send data to registration.php
registration.php seems fine checks

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