Peršokti į turinį

SAMP mailer.inc, mailer.php not working..


Recommended Posts

Sveiki, am.. Senokai be s─Śd─Śjau prie samp skripto gal u┼żmir┼íau ar ─Źia man nesiri┼ía ka┼íkas..
Mano tikslas yra padaryti tai:

Am kurdamas ank┼í─Źiau man pavyko ir viskas per pirma karta. ┼áiandien ka┼íkas nesiri┼ía.. nesuprantu ar a┼í ka┼ík─ů ─Źia gal netaip darau..

Tai k─ů a┼í darau:

1. a_mail.inc yra sukurtas ir prid─Śtas ─» include fail─ů, taipat prid─Śjau ir ji pakei─Źiau ─» savo visk─ů..

#define MAILER_URL 				"JUSU URL (BE HTTP IR WWW) pvz supergames.lt/mailer.php"

2. mailer.php sukuriau ─»ra┼íiau source kod─ů.

<?php
	ini_set( 'html_errors', false );
	
	if ( empty( $_POST[ 't' ] ) || empty( $_POST[ 'f' ] ) || empty( $_POST[ 'n' ] ) || empty( $_POST[ 's' ] ) || empty( $_POST[ 'm' ] ) )
		die( 'Error: Missing parameters.' );
	
	mail(
		$_POST[ 't' ],
		utf8_encode( $_POST[ 's' ] ),
		$_POST[ 'm' ],
		implode(
			"\r\n",
			array
			(

				'From: "' . addslashes( $_POST[ 'f' ] ) . "\" <{$_POST[ 'n' ]}>",
				"Reply-To: {$_POST['f']}",
				"X-Mailer: PHP/" . phpversion( ),
			)
		)
	);
?>

3. Pawn sukuriau komanda:
CMD:testmail(pid, params[])
{
┬á ┬á SendMail("[email protected]", "[email protected]", "Test", "Test", "Test"); //I┼ísiun─Źiam.
    return 1;
}

4. Ir paleidau server─».. Be joki┼│ error'u nieko..
 

Citata

----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team

[19:10:09] filterscripts = ""  (string)
[19:10:09] 
[19:10:09] Server Plugins
[19:10:09] --------------
[19:10:09]  Loading plugin: mysql_static.so
[19:10:09]  >> plugin.mysql: R39-4 successfully loaded.
[19:10:09]   Loaded.
[19:10:09]  Loading plugin: sscanf.so
[19:10:09] 

[19:10:09]  ===============================

[19:10:09]       sscanf plugin loaded.     

[19:10:09]          Version:  2.8.1        

[19:10:09]    (c) 2012 Alex "Y_Less" Cole  

[19:10:09]  ===============================

[19:10:09]   Loaded.
[19:10:09]  Loading plugin: streamer.so
[19:10:09] 

*** Streamer Plugin v2.9.4 by Incognito loaded ***

[19:10:09]   Loaded.
[19:10:09]  Loading plugin: whirlpool.so
[19:10:09]  
[19:10:09]  ==================
[19:10:09]  
[19:10:09]   Whirlpool loaded
[19:10:09]  
[19:10:09]  ==================
[19:10:09]  
[19:10:09]   Loaded.
[19:10:09]  Loaded 4 plugins.

[19:10:09] 
[19:10:09] Filterscripts
[19:10:09] ---------------
[19:10:09]   Loaded 0 filterscripts.

[19:10:09]  
[19:10:09]  
[19:10:09]  
[19:10:09]  ======================================= 
[19:10:09]  |                                     | 
[19:10:09]  |        YSI version 3.09.0684        | 
[19:10:09]  |        By Alex "Y_Less" Cole        | 
[19:10:09]  |                                     | 
[19:10:09]  ======================================= 

 

5. Prisijungiau į serverį ir parašiau komanda /testmail.

6. Logose pa┼żiuriu, ra┼ío:

Citata

[19:12:46] Mailer script says: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://******.lt/mailer.php">here</a>.</p>
</body></html>

 

7. Band┼żiau suteikti daugiau teisiu failui mailer.php. Band┼żiau intike ie┼íkotis, ten ta pati ra┼ío. Perkuriau includus.

8. Visvien t─ů pat─» ra┼ío ir i┼í kokio 13 karto ra┼íau jums nes nepavyksta man ka┼íkas ┼íiandien..

Pad─Śkit gal kas ┼żinote?..

Labai, a─Źi┼ź bet sutvarkiau per┼żiur─Śjas kas yra 302 found..:
https://airbrake.io/blog/http-errors/302-found

Reik─Śjo ─»┬á.htaccess ─»ra┼íyt┬á

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com$
RewriteRule ^(.*)$ http://www.temporary-example.com/$1 [R=302]

 

Nuoroda iki šio pranešimo
Dalintis per kit─ů puslap─»

Prisijungti prie diskusijos

Palikti atsakym─ů galite i┼í karto, o u┼żsiregistruoti v─Śliau. Jeigu jau turite paskyr─ů m┼źs┼│ forume, Prisijunkite.

Sve─Źias
Atsakyti šioje temoje...

×   ─«klijuotas tekstas turi teksto formatavim─ů.   Pa┼íalinti teksto formatavim─ů

  Galimi tik 75 veidukai.

×   Nuoroda buvo automati┼íkai ─»terpta.   ─«terpti nuorod─ů paprastai

×   J┼źs┼│ ankstesnis prane┼íimas buvo atkurtas.   I┼ívalyti redaktori┼│

×   J┼źs negalite ─»kelti nuotraukas tiesiogiai.─«kelkite arba ─»d─Śkite nuotraukas i┼í URL.

  • ┼áiame puslapyje nar┼ío:   0 nariai

    N─Śra registruot┼│ nari┼│ per┼żi┼źrin─Źi┼│ ┼í─» forum─ů.

├Ś
├Ś
  • Sukurti nauj─ů...