Code: Select all
andCode: Select all
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hello
I'm trying to write a php script, which will send me email message through proxy that is setup on my work place (tel780:8080).
I found many mail script, but I cannot send email because of proxy. I tried with Http tunneling programs, but no luck.
If somebody knows how to write this kind of script I would appreciate.
This code access the web pages through proxy, but I don't know how to setup for mail.Code: Select all
<?php
/*************start code**************/
/*your proxy server address*/
$proxy = "tel780";
/*your proxy server port*/
$port = 8080;
/*the url you want to connect to*/
$url = "http://www.php.net/";
$fp = fsockopen($proxy, $port);
fputs($fp, "GET $url HTTP/1.0\r\nHost: $proxy\r\n\r\n");
while(!feof($fp)){
$line = fgets($fp, 4000);
print($line);
}
fclose($fp);
?>feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]