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

Amend code to allow multiple attachments
Hi

I have a php page that allows the user to browse to a file (image) then sumbit, the confi

Adding meta tags under Zend FW
Hello there, recently has come to my hands the FTP of a website which is running under Zend, I would

Question about the upload of large files
Hi there,

I have a question about the upload of large files, like videos (files generally abo

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

Basic Question about Threading and PHP...
I have a page that I am working on and it is taking several hours to process. The basics of what th

Product categories for registration
Dear all,

We are going live with the Supplier registered next week. At standard, the 'sel

IF Statement & Two Tables With Different Echoes
I'm retrieving two tables in a single query using UNION ALL, like so:

Code: $query = "SE

Extracting Long text from message class with parameters
Hi,

I would like to extract the long text from a message class. However, the long text ha

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

Operating System
How in PHP or other language can I detect Operating system, ie Windows XP Home, Windows 7 Ultimate,

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