
Shadowing
Members-
Posts
722 -
Joined
-
Last visited
Everything posted by Shadowing
-
idk guys im pretty confused lol. this is giving me a undefine function error cant figure that one out i dont understand the $1 in the links $_POST['message'] = "hey whats up @baal how are you doing. @paul bleh"; echo str_exchange(" @",$_POST['message']," <a href='' class='profile_name' id='$1'>$1</a>"); function str_exchange($item,$string,$replace) { $count = substr_count($string, $item); $x = 0; While($x < $count) { $string = preg_replace("/\\s@(\\S+)/u", $string, $replace); ++$x; } return $string; }
-
well crap lol. i dont think i can turn this into a function that i can use for more then one thing. cause i cant fill in the name variable when telling it when passing the 3rd agrument lol hard to explain, anyone get what im saying? i knew the problem would exist before writing but wrote it for an example $_POST['message'] = "hey whats up @baal how are you doing. @paul bleh"; echo str_exchange(" @",$_POST['message']," <a href='' class='profile_name' id='$name'>$name</a>"); function str_exchange($item,$string,$replace) { $count = substr_count($string, $item); $x = 0; While($x < $count) { preg_match('/\s@([^\s]+)\s/', $string, $matches); $name = $matches[1]; //$replace = " <a href='' class='profile_name' id='$name'>$name</a>"; $string = str_replace(" ".trim($matches[0]), $replace, $string); ++$x; } return $string; }
-
how would i go about changing it so its looking for " @" instead of "@" this way people can still type email address's and it will ignore it
-
when I use the code im using now the return of the array is Array ( [0] => @sam[1] => sam) so im already getting just the name
-
ya the name is dynamtic im confused on how i would use preg_replace. How would i get the variable $name filled in this link with sam using preg_replace instead of preg_match? You saying this could be done in one line of code xyph? <a href='' class='profile_name' id='$name>$name</a> $string = "hey whats up @sam how are you doing"; if (preg_match('/@([^\s]+)\s/', $_POST['message'], $name)) { print_r($name); }
-
thanks for the responce Tarential expressions are like a dark art to me lol Thanks alot it works. i'll go ahead and just submit my code incase someone else reads this to help them out. $string = "hey whats up @sam how are you doing"; if (preg_match('/@([^\s]+)\s/', $string, $name)) { print_r($name); }
-
Hey guys i think i must be missing something. Trying to do this with less code possible Was looking over string functions in the manual but i dont see anything that does what im trying to do. $string = "hey whats up @sam how are you doing"; I'm wanting to replace @sam with <a href='' class='profile_name' id='$name>$name</a> is there a way to extract @sam so i can get rid of the @ then place the name into the link $name the only thing i can find is finding the location of @ using strpos but im not sure how to extract only the letters attached to @ and nothing else in the string only way i can think about doing it is to extract everything after @ then exploding it by spaces with a limit of 1 is that the best way to do this?
-
Having some problems sending mail to some address's
Shadowing replied to Shadowing's topic in PHP Coding Help
Solved my problem, my domain was incorrect on my mail server configuration -
figured out my problem my domain was incorrect on my mail server configuration set up
-
what im really trying to figure out is the account name that i need to use for my from address
-
thanks for the reply Mahnqiel i ran a setup command for exim and it poped up. so apparently exim is installed but not setup i guess hmm wierd when i did that i got all this below Type dpkg --help for help about installing and deinstalling packages [*]; Use `dselect' or `aptitude' for user-friendly package management; Type dpkg -Dhelp for a list of dpkg debug flag values; Type dpkg --force-help for a list of forcing options; Type dpkg-deb --help for help about manipulating *.deb files; Type dpkg --license for copyright license and lack of warranty (GNU GPL) [*]. if i run sudo dpkg-reconfigure postfix i get "postfix is broken or not fully installed
-
Having some problems sending mail to some address's
Shadowing replied to Shadowing's topic in PHP Coding Help
Hey jazzman i did another test I think the problem is my From email is incorrect i just tried [email protected] which is what it should of been -
Having some problems sending mail to some address's
Shadowing replied to Shadowing's topic in PHP Coding Help
alright so you didnt get it at [email protected] my friend hasnt replied back yet to varify -
Having some problems sending mail to some address's
Shadowing replied to Shadowing's topic in PHP Coding Help
http://stargatesystemlords.com/sendMail.php k i did your exact set up. waiting back to hear from my friend if he got the message but it should of went to your bg address too, i added my hotmail address and my friends address to the array list. it worked on hotmail. also as a note apparently hotmail is making emails be spam if they are using BCC so the only thing i changed in your code was $header_.='FROM: [email protected]'. "\n"; and adding in the two other email adddress's -
Having some problems sending mail to some address's
Shadowing replied to Shadowing's topic in PHP Coding Help
yah your email to [email protected] worked damn this is driving me crazy, if you can do it why cant I geez -
Having some problems sending mail to some address's
Shadowing replied to Shadowing's topic in PHP Coding Help
Hey Jazzman just for kicks any chance could you try sending a message saying "This is a test from jazzman" to [email protected] -
Having some problems sending mail to some address's
Shadowing replied to Shadowing's topic in PHP Coding Help
so the 26hp.26horses.com is coming from my php config file what mail server do you use jazzman just curious I'm having a few people tell me the problem cant be my mail server since i can send to some hotmail,gmail etc.... -
Having some problems sending mail to some address's
Shadowing replied to Shadowing's topic in PHP Coding Help
I just figured out that im running EXIM for my mail server. -
Having some problems sending mail to some address's
Shadowing replied to Shadowing's topic in PHP Coding Help
any idea why its saying [email protected] id assume a setting on my mail server is wrong but still though i cant send to your .bg address or my vmobl.com address hotmail probably junked it cause it was 26hp.26horses.com with it having two dots maybe idk -
Having some problems sending mail to some address's
Shadowing replied to Shadowing's topic in PHP Coding Help
thats wierd i used your code to send emails out and the from: address wasnt what i expected says its from [email protected] i was expecting it to say [email protected] also i noticed that hotmail detected this automactily as spam i resent it again and added in your .ca address let me know if you get it. appreciate you helping me with this here is the code i used $filename = "This is a test"; $folder_img = "This is a test"; $local = $_SERVER['SERVER_NAME']; $subject = "This is a test"; // associative array, this data comes from database $headerFields = array('BCC: [email protected],[email protected],[email protected],[email protected],[email protected]'); $headers = 'MIME-Version: 1.0' . "\n" . 'Content-type: text/plain; charset=UTF-8' . "\n" . 'Content-Transfer-Encoding: base64' . "\n"; 'X-Priority: 1 (Higuest)' . "\n"; 'X-MSMail-Priority: High' . "\n"; 'Importance: High' . "\n"; $headers .= implode(',', $headerFields)."\n"; $message = ''."\n"; $message .= $_POST['message'] . "\n"; // link to image or church bulletin $message .= 'http://' . $local . '/'. $folder_img.'/'. $filename ."\n"; if(mail(null, '=?UTF-8?B?'.base64_encode($subject).'?=', base64_encode($message), $headers . '')){ echo "Mail has been successfully sent"; exit; } -
Having some problems sending mail to some address's
Shadowing replied to Shadowing's topic in PHP Coding Help
I sent you a email jazzman -
Having some problems sending mail to some address's
Shadowing replied to Shadowing's topic in PHP Coding Help
lol why did you say im affraid of something obviously? anyways havnt tried your latest idea yet I think the problem is my mail server now though i was able to send mail to to one of the address's with phpfreaks using SMF by changing my email on this account to a @vmobl.com but i couldnt with using my forum on my website which uses SMF also -
Hey guys i cant figure out what mail server my server is running I'm running Ubuntu Anyone know a way i can find out. I thought it was postfix but i ran some commands that i googled and the config files dont exist
-
Having some problems sending mail to some address's
Shadowing replied to Shadowing's topic in PHP Coding Help
thanks for the responce jazzman tried your idea with no success. im going to check to make sure the from address can recieve mail. I read somewhere that if it cant some clients will do a check to make sure a from address can recieve mail or not if not block it. -
Hey guys having a few issues sending mail to some address's I can send mail to all major emails, gmail,hotmail, yahoo etc.... One i know for sure is .de and a few others like [email protected] Made a small example that is userfriendly to read. Was reading the php manual and seems like i need to headers for additional information? $to = "[email protected]"; $from = "[email protected]"; $subject = "Stargate System Lords"; $message = "Your alerts are now set up for Stargate System Lords"; $headers = ''; $headers .= "Content-type: text/html\r\n"; $headers .= "From: Stargate System Lords <$from>\n"; $headers .= "Reply-to: $from\n"; $headers .= "Return-Path: $from\n"; $headers .= "Message-ID: <" . md5(uniqid(time())) . "@" . $_SERVER['SERVER_NAME'] . ">\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Date: " . date('r', time()) . "\n"; mail($to, $subject, $message, $headers);