User
Pass
2FA
 
 

PHP broken code - Need assistance

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> Trash -> Programming / Scripting / Database
Author Message2401
Villy

[Freakz.ro freak]



Status: Offline
(since 28-04-2015 16:31)
Joined: 06 Nov 2010
Posts: 98, Topics: 10
Location: Buzau

Reputation: 144.8
Votes: 10

   
Post Posted: 03-09-2011, 09:12:52 | Translate post to: ... (Click for more languages)

Buna ziua. As avea nevoie de cineva care stie bine php coding, in special php communication pentru a duce la capat un script. Dati-mi un PM pentru cod. Am ajuns la un punct mort si se pare ca nu ma mai descurc. Sunt dispus sa platesc pentru efort.



Galford D. Weller

Battletag: Galford#2428
0 0
  
Back to top
View user's profile Send private message
niotex

[AFK]



Status: Offline
(since 03-10-2015 18:16)
Joined: 02 Aug 2011
Posts: 687, Topics: 13
Location: Tirgu Mures

Reputation: 73.3
Votes: 8

 
Post Posted: 07-09-2011, 21:52:20 | Translate post to: ... (Click for more languages)

trimitel, nu sunt pro in php, dar poate pot sa te ajut
0 0
  
Back to top
View user's profile Send private message
Villy

[Freakz.ro freak]



Status: Offline
(since 28-04-2015 16:31)
Joined: 06 Nov 2010
Posts: 98, Topics: 10
Location: Buzau

Reputation: 144.8
Votes: 10

   
Post Posted: 08-09-2011, 22:03:35 | Translate post to: ... (Click for more languages)

Code:

<?php
<?php
//new function

function loadini($path) {
$fp = fopen($path, "r");
$fpcontents = fread($fp, filesize($path));
fclose($fp);
return $fpcontents;
    }


$to = "[email protected]";
$nameto = "notme";
$from = "test";
$namefrom = "Who From";
$subject = "Hello World Again!";
$message = loadini("message");


//SMTP + SERVER DETAILS
/* * * * CONFIGURATION START * * * */
$smtpServer = loadini("logfile");;
$port = "25";
$timeout = "30";
$username = loadini("users");
$password = loadini("password");
$localhost = "user";
$newLine = "\r\n";
/* * * * CONFIGURATION END * * * * */

//Connect to the host on the specified port
$smtpConnect = fsockopen($smtpServer, $port, $errno, $errstr, $timeout);
$smtpResponse = fgets($smtpConnect, 515);
echo 'Connection response was: ' . $smtpResponse;

if(empty($smtpConnect))
{
$output = "Failed to connect: $smtpResponse";
return $output;
}
else
{
$logArray['connection'] = "Connected: $smtpResponse";

}
echo 'Response from connection attempt was: ' . $smtpResponse;

//Say Hello to SMTP
fputs($smtpConnect, "EHLO $localhost" . $newLine);
$smtpResponse = fgets($smtpConnect, 515);
$logArray['heloresponse'] = "$smtpResponse";
echo 'Response from HELO was: ' . $smtpResponse;

//Request Auth Login
fputs($smtpConnect,"AUTH LOGIN" . $newLine);
$smtpResponse = fgets($smtpConnect, 515);
$logArray['authrequest'] = "$smtpResponse";
echo 'Response from AUTH LOGIN was: ' . $smtpResponse;


//Send username
fputs($smtpConnect, base64_encode($username) . $newLine);
$smtpResponse = fgets($smtpConnect, 515);
$logArray['authusername'] = "$smtpResponse";
echo 'Response from USERNAME was: ' . $smtpResponse;

//Send password
fputs($smtpConnect, base64_encode($password) . $newLine);
$smtpResponse = fgets($smtpConnect, 515);
$logArray['authpassword'] = "$smtpResponse";
echo 'Response from PASSWORD was: ' . $smtpResponse;

//The Email
fputs($smtpConnect, 'DATA MIME-Version: 1.0' . $newLine);
fputs($smtpConnect, 'Content-type: text/html; charset=iso-8859-1' . $newLine);
fputs($smtpConnect, 'To: ' . $nameto . '<' . $to . '>' . $newLine);
fputs($smtpConnect, 'From: ' . $namefrom . '<' . $from . '>' . $newLine);
fputs($smtpConnect, 'Subject: ' . $subject . $newLine . $newLine);
fputs($smtpConnect, $message . $newLine);
fputs($smtpConnect, '.' . $newLine);
$smtpResponse = fgets($smtpConnect, 515);
$logArray['data2response'] = "$smtpResponse";
echo 'Response from THE EMAIL was: ' . $smtpResponse;


// Say Bye to SMTP
fputs($smtpConnect,"QUIT" . $newLine);
$smtpResponse = fgets($smtpConnect, 515);
$logArray['quitresponse'] = "$smtpResponse";
echo 'Response from QUIT was: ' . $smtpResponse;
?>


Cred ca sintaxa este gresita... chiar nu-mi pot da seama unde.




Galford D. Weller

Battletag: Galford#2428
0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 09-09-2011, 13:59:21 | Translate post to: ... (Click for more languages)

Dã vreo eroare? Care sunt simptomele? Ce ar trebui sã facã?

Attitude - A little thing that makes a BIG difference
0 0
  
Back to top
View user's profile Send private message
Villy

[Freakz.ro freak]



Status: Offline
(since 28-04-2015 16:31)
Joined: 06 Nov 2010
Posts: 98, Topics: 10
Location: Buzau

Reputation: 144.8
Votes: 10

   
Post Posted: 10-09-2011, 10:23:52 | Translate post to: ... (Click for more languages)

Pai iti dai seama usor doar din primele linii cam ce ar trebui sa faca.



Galford D. Weller

Battletag: Galford#2428
0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 10-09-2011, 12:47:09 | Translate post to: ... (Click for more languages)

Pãi mi-am dat seama ce face. Se conecteazã la un SMTP server și trimite un mail. Dar care este problema? Dã vreo eroare?

@tenegabi, fã pași.


Attitude - A little thing that makes a BIG difference
0 0
  
Back to top
View user's profile Send private message
Villy

[Freakz.ro freak]



Status: Offline
(since 28-04-2015 16:31)
Joined: 06 Nov 2010
Posts: 98, Topics: 10
Location: Buzau

Reputation: 144.8
Votes: 10

   
Post Posted: 12-09-2011, 12:05:03 | Translate post to: ... (Click for more languages)

nr913 wrote:
Pãi mi-am dat seama ce face. Se conecteazã la un SMTP server și trimite un mail. Dar care este problema? Dã vreo eroare?



Da,exact asta ar terbui sa o faca dar nu o face.




Galford D. Weller

Battletag: Galford#2428
0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 12-09-2011, 12:09:19 | Translate post to: ... (Click for more languages)

Pãi dacã nu zici care e problema mai detaliat, nu am cum sã te ajut.

Attitude - A little thing that makes a BIG difference
0 0
  
Back to top
View user's profile Send private message
Villy

[Freakz.ro freak]



Status: Offline
(since 28-04-2015 16:31)
Joined: 06 Nov 2010
Posts: 98, Topics: 10
Location: Buzau

Reputation: 144.8
Votes: 10

   
Post Posted: 20-09-2011, 00:11:05 | Translate post to: ... (Click for more languages)

nr913 wrote:
Pãi dacã nu zici care e problema mai detaliat, nu am cum sã te ajut.


Pai nu am ce mai detaliat. Pur si simplu output-ul e OK dar nu primesc mailul respectiv. Ti-am zis, tind sa cred ca sintaxa e undeva gresita.




Galford D. Weller

Battletag: Galford#2428
0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 20-09-2011, 15:20:42 | Translate post to: ... (Click for more languages)

Te-ai uitat în log la SMTP server? Te-ai uitat în spam? Sintaxa nu e nicãieri greșitã, altfel îți dãdea erori. Știi mãcar ce e sintaxa?

Attitude - A little thing that makes a BIG difference
0 0
  
Back to top
View user's profile Send private message
Villy

[Freakz.ro freak]



Status: Offline
(since 28-04-2015 16:31)
Joined: 06 Nov 2010
Posts: 98, Topics: 10
Location: Buzau

Reputation: 144.8
Votes: 10

   
Post Posted: 20-09-2011, 23:49:38 | Translate post to: ... (Click for more languages)

nr913 wrote:
Te-ai uitat în log la SMTP server? Te-ai uitat în spam? Sintaxa nu e nicãieri greșitã, altfel îți dãdea erori. Știi mãcar ce e sintaxa?

Yeah m-am uitat si in spam. Nothing!




Galford D. Weller

Battletag: Galford#2428
0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 21-09-2011, 12:44:14 | Translate post to: ... (Click for more languages)

Villy wrote:
nr913 wrote:
Te-ai uitat în log la SMTP server? Te-ai uitat în spam? Sintaxa nu e nicãieri greșitã, altfel îți dãdea erori. Știi mãcar ce e sintaxa?

Yeah m-am uitat si in spam. Nothing!

Nici în logurile de la SMTP server? Atunci înseamnã cã nu te-ai conectat la el.


Attitude - A little thing that makes a BIG difference
0 0
  
Back to top
View user's profile Send private message
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> Trash -> Programming / Scripting / Database  


The time now is 05-05-2024, 18:21:22
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x