Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,157,997 members, 7,835,348 topics. Date: Tuesday, 21 May 2024 at 09:02 AM

Joker2k's Posts

Nairaland Forum / Joker2k's Profile / Joker2k's Posts

(1) (2) (of 2 pages)

Webmasters / Re: Only For Yawatide,webdezzi,*dhtml, And The Other "guru": by joker2k: 3:46pm On Dec 09, 2009
yawa-ti-de:

Very good joker, or is it dhtml? tongue

I have definitely learned something today. Thanks!
you are welcome jor. I hope the OP gets it all sorted out.
I still have plenty of stuffs to do before getting back fully to this board.
Webmasters / Re: Only For Yawatide,webdezzi,*dhtml, And The Other "guru": by joker2k: 7:43am On Dec 09, 2009
Completed:

Let us assume your cpanel username is wale

then go to your email forwarders, add a new forwarder and
in the piping option add

|/usr/bin/php -q /home/wale/public_html/mail/pipe.php


It will ask you something about correcting piping problem, just click ok or yes or whatever it shows

then save the piping script to wherever you point it to. i chose to have a mail folder called mail under the public_html



pipe.php
#!/usr/local/bin/php -q
<?php
error_reporting(0);
// read from stdin
$fd = fopen("php://stdin", "r"wink;
$email = "";
while (!feof($fd)) {
$email .= fread($fd, 1024);
}
fclose($fd);





$host="localhost"; //mysql host
$db="mailpipe"; //database
$username="root"; //dbase username
$password="password"; //password

$link = mysql_connect($host, $username, $password);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
// make foo the current db
$db_selected = mysql_select_db($db, $link);
if (!$db_selected) {
die ("Can\'t use $db : " . mysql_error());
}

$message=addslashes("$email"wink; //save the entire email to dbase

mysql_query("insert into msg(message) values('$message')"wink or die(mysql_error());

mysql_close($link);





// handle email
//$email=strip_tags ($email);
$lines = explode("\n", $email);

// empty vars

$from = "";
$subject = "";
$headers = "";
$message = "";
$splittingheaders = true;

for ($i=0; $i < count($lines); $i++) {
if ($splittingheaders) {
// this is a header
$headers .= $lines[$i]."\n";
// look out for special headers
if (preg_match("/^Subject: (.*)/", $lines[$i], $matches)) {
$subject = $matches[1];
}
if (preg_match("/^From: (.*)/", $lines[$i], $matches)) {
$from = $matches[1];
}
} else {
// not a header, but message
$message .= $lines[$i]."\n";
}

if (trim($lines[$i])==""wink {
// empty line, header section has ended
$splittingheaders = false;
}
}

preg_match("/boundary=\".*?\"/i", $headers, $boundary);
$boundaryfulltext = $boundary[0];

if ($boundaryfulltext!=""wink
{
$find = array("/boundary=\"/i", "/\"/i"wink;
$boundarytext = preg_replace($find, "", $boundaryfulltext);
$splitmessage = explode("--" . $boundarytext, $message);
$fullmessage = ltrim($splitmessage[1]);
preg_match('/\n\n(.*)/is', $fullmessage, $splitmore);

if (substr(ltrim($splitmore[0]), 0, 2)=="--"wink
{
$actualmessage = $splitmore[0];
}
else
{
$actualmessage = ltrim($splitmore[0]);
}
}
else
{
$actualmessage = ltrim($message);
}

$clean = array("/\n--.*/is", "/=3D\n.*/s"wink;
$cleanmessage = trim(preg_replace($clean, "", $actualmessage));

// test action to be replaced by db insertion code
$body = "$cleanmessage";



//forward email
mail('diltony@yahoo.com', $subject, $body, "From: ".$from);
?>

The last aspect of that forwarded email can be removed since it is not necessary.
But while testing, you can still leave it there.


The mailpipe database contain only one table:

message
CREATE TABLE IF NOT EXISTS `msg` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`message` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM

This is the first part. From here, you will need an email reader. but use this first, let me see what you can do with it.
Questions are welcome. And i am interested in seeing how this is configured on other servers other than cpanel and bluehost
Webmasters / Re: Only For Yawatide,webdezzi,*dhtml, And The Other "guru": by joker2k: 6:53am On Dec 09, 2009
Message from dhtml:
I am working on the script, almost completed it. I will try complete and post it today. 95% completed
Romance / Re: I Am Addicted To Her by joker2k: 11:48pm On Dec 08, 2009
Ebonyeyes:

Well she already is taken so you go and find your own and leave her be.
However, if you really like her so much, and want to collect her from her bf, it can be done
but only if she is willing to.

But, i suspect she is a flirt. she may want to fuc.k you, but has warned you not to try to get too close
as to think she can become your gurlfriend, they are 2 different things entirely.

I mean, i do flirt alot, but when the gurls want to get too close, i zoom off, like stop picking calls and all that.
Romance / Re: New Era Of Word Censorship On Nairaland by joker2k: 8:49pm On Dec 08, 2009
ozalogbo:

A very pleasant and welcome development. Atleast, we would have some sanity in language use
As if it is ever that easy. There are gazillion websites on the web that use languages such as vagin.a which is a normal english word

Is the problem that some words are considered insultive like puss.y or words like vagin.a are no longer acceptable
or rather that google is just tryin to make NL look worthless so they can buy it for =N=5,000 naira? or there is something i am missing?
Romance / Re: New Era Of Word Censorship On Nairaland by joker2k: 6:31pm On Dec 08, 2009
I extra-bold it, oya seun, answer us now now - the elders are enraged! BTW banning will not change anything
Dating And Meet-up Zone / Re: Re: A Yoruba Girl Seek A Caring Guy For A Serious Relationship (scam) by joker2k: 5:52pm On Dec 08, 2009
wale.star:

He is lucky, the guy self dey hungry for toto, when He heard hotel, He quickly run go, if the girl has mentioned Mr.Bigg, the guy    might give excused that he wasnt around
yeah right
Romance / Re: New Era Of Word Censorship On Nairaland by joker2k: 4:40pm On Dec 08, 2009
mr.official:


lol, you get time.

I'm not gonna do that if it happens.

i get plenty of time o. when u have been banned plenty times, getting banned again will not make any difference.
I suspect it is these sets of people that seun finds veery hard to control.
Anyways, long live nairaland jor. shame to all the bad people.

I subscribe to changing back to our local dialect, so instead of mudafoka, i can use iyalaya-e!
Romance / Re: New Era Of Word Censorship On Nairaland by joker2k: 2:01pm On Dec 08, 2009
mr.official:



I dey with you.

Seun does it like - I am the owner of the forum, and i do whatever pleases me. He neglects most people on NL.

Which I do not like, I asked him to remove the restriction barring me from editing my nickname, he didn't even reply me. In which I even quoted him.

grow the fuc.k up abi na shut the fuc.k up It actually works sha
Oya, seun, i command you to ban me now (lemme quickly resign up)

(1) (2) (of 2 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 22
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.