Behind a firewall How to set your proxy and port no in php?
Posted: Mon Apr 20, 2009 2:14 pm
i want to run this code but as i m behind firewall i need to insert user authentacation ,proxy and port number how to insert in this code
Code: Select all
<?php
$f = fopen("http://www.google.com","r");
while( $buf = fgets($f,1024) )
{
preg_match_all("/<a.*? href=\"(.*?)\".*?>(.*?)<\/a>/i",$buf,$words);
for( $i = 0; $words[$i]; $i++ )
{
for( $j = 0; $words[$i][$j]; $j++ )
{
$cur_word = strtolower($words[$i][$j]);
print "Indexing: $cur_word<br>";
}
}
}
?>