<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/17005" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2009-07-04T18:40:50-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/17005</id>

		<entry>
		<author><name><![CDATA[wann]]></name></author>
		<updated>2009-07-04T18:40:50-04:00</updated>

		<published>2009-07-04T18:40:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89443#p89443</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89443#p89443"/>
		<title type="html"><![CDATA[tcl + php code]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89443#p89443"><![CDATA[
any one have idea for this php code??<br>i wanna use this php code ( song request ) and tcl.<br>after request at php code, 1 bot join our server and send request song over there..please help me..<br><br>this php code<br><br>[quote]&lt;?php<br><br>// First check to see if the for has been submitted<br>if (isset($_POST['submitted'])) {<br><br>$errors = array(); // Initialize error array.<br><br>// Check for a name<br>if (empty($_POST['name'])) {<br>$errors[] = 'You forgot to enter your name.';<br>}<br><br>// Check for a valid email address<br>if (!preg_match("/^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)*\.([a-zA-Z]{2,6})$/", $_POST['email'])) {<br>$errors[] = 'You need to enter a valid email address.';<br>}<br><br>// Check for a message<br>if (empty($_POST['message'])) {<br>$errors[] = 'You forgot to enter a message.';<br>}<br><br>if (empty($errors)) { // If everything is OK.<br><br>// Let's send an email<br>// Let's first send some email to the admin<br>$mailTo = "<a href="mailto:my@email.com">my@email.com</a>";<br>$senderName = $_POST['name'];<br>$senderMail = $_POST['email'];<br>$break .= "&lt;br/&gt;";<br>$eol .= "\r\n";<br>$sol .= "\n";<br>$headers .= 'To: '.$mailTo.' &lt;'.$mailTo.'&gt;'.$eol;<br>$headers .= 'From: '.$senderName.' &lt;'.$senderMail.'&gt;'.$eol;<br>$headers .= 'Date: '.date("r").$eol;<br>$headers .= 'Sender-IP: '.$_SERVER["REMOTE_ADDR"].$eol;<br>$headers .= 'X-Mailser: MCT Adv.PHP Mailer 1.0'.$eol;<br>$headers .= 'MIME-Version: 1.0'.$eol;<br>//$headers .= 'Content-Type: text/html; charset="windows-1251"\r\n';<br>$headers .= 'Content-Type: text/html; charset="iso-8859-1"'.$eol;<br>$subject = 'New Song Request';<br><br>$msg .= '&lt;font face=arial size=2&gt;';<br>$msg .= 'You have recieved a message from SempoiBox Contact Form'.$break.$break;<br>$msg .= 'Please review the information below.'.$break.$break;<br>$msg .= '&lt;strong&gt;Name:&lt;/strong&gt; '.$_POST['name'].$break;<br>$msg .= '&lt;strong&gt;E-Mail:&lt;/strong&gt; '.$_POST['email'].$break;<br>$msg .= '&lt;strong&gt;Song:&lt;/strong&gt; '.$_POST['phone'].$break;<br>$msg .= '&lt;strong&gt;Message:&lt;/strong&gt; '.$_POST['message'].$break;<br>$msg .= $break;<br>$msg .= '_______________________________________________________________________'.$break;<br>$msg .= 'Revofm <a href="http://sempoibox.net/revofm%27.$break" class="postlink">http://sempoibox.net/revofm'.$break</a>;<br>$msg .= '&lt;/font&gt;';<br><br>// Mail it<br>mail($mailTo, $subject, $msg, $headers);<br><br>echo '&lt;h1 if="mainhead"&gt;Thank you!&lt;/h1&gt;<br>&lt;p class="main_txt"&gt;Thanks for contacting us. Someone will get back to you as soon as possible.&lt;/p&gt;';<br><br>} else {<br>echo '&lt;h1 id="mainhead"&gt;Error!&lt;/h1&gt;<br>&lt;p class="main_txt"&gt;The following error(s) occured.&lt;br/&gt;';<br>foreach ($errors as $errorMSG) { // Print each error.<br>echo " - $errorMSG&lt;br/&gt;\n";<br>} // End of Errors<br><br>echo 'Please go &lt;a href="Javascript:history.go(-1)"&gt;back&lt;/a&gt; and try again.&lt;/p&gt;';<br><br>} // End of if (empty($errors)) IF Statement<br><br>} else { // Display the form.<br><br>echo'&lt;p class="main_txt"&gt;Please take a moment to fill out the form below to contact us.&lt;br&gt;<br>&lt;form action="formMail.php" method="post"&gt;<br>Name:   *&lt;br&gt;<br>&lt;input name="name" type="text" value="'.$_POST['name'].'" tabindex="1" size="50" /&gt;<br>&lt;br&gt;<br>E-Mail Address:   *&lt;br&gt;<br>&lt;input name="email" type="text" id="email" value="'.$_POST['email'].'" tabindex="2" size="50" /&gt;<br>&lt;br&gt;<br>Song:&lt;br&gt;<br>&lt;input name="phone" type="text" id="phone" value="'.$_POST['phone'].'" tabindex="3" size="50" /&gt;<br>&lt;br&gt;<br>Message:   *&lt;br&gt;<br>&lt;textarea name="message" cols="38" rows="8" id="msg" tabindex="4" /&gt;'.$_POST['$message'].'&lt;/textarea&gt;<br>&lt;br&gt;&lt;br&gt;<br>&lt;input name="submit" type="submit" value="Hantar" tabindex="5" /&gt;&lt;input type="hidden" name="submitted" value="TRUE" /&gt;   &lt;input name="reset" type="reset" value="Reset" tabindex="6" /&gt;   &lt;em&gt;* = required&lt;/em&gt;<br>&lt;/form&gt;<br>&lt;/p&gt;';<br><br>} // End of submitted IF-ELSE statement<br><br>?&gt; [/quote]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10678">wann</a> — Sat Jul 04, 2009 6:40 pm</p><hr />
]]></content>
	</entry>
	</feed>
