Behind a firewall How to set your proxy and port no in php?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dorjay
Forum Newbie
Posts: 1
Joined: Mon Apr 20, 2009 10:08 am

Behind a firewall How to set your proxy and port no in php?

Post by dorjay »

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>";
   }
 }
}
?>
Post Reply