Redirection plugin post Tumblr to WordPress

Please follow that instruction:


Source URL would have: .*/post/\d+/(.*)

Destination URL would have: /$1

Redirections Plugin: Tumblr Settings


permalinks not working in ubuntu

i have solved that problem in few mintue

please follow that step then Enjoy ūüėõ

 sudo a2enmod rewrite

nano /etc/apache2/sites-enabled/000-default


AllowOverride None replace to AllowOverride All

please find that line

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None # change this line
    Order allow,deny
    allow from all

replace that
<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All # now it will read .htaccess
    Order allow,deny
    allow from all

sudo service apache2 restart

paypal pro script in php

At first I develop the form where user give all information. I did not validate all form fields but when you use it for your website please validate all form fields then process in next step. I name it index.php

After click submit, using ajax post request all the form data will send to send.php. In send.php page I silently send all the value to paypal site using cURL. But here I need to put my paypal pro cardinal details like username, password, signature. When you create paypal pro account paypal will generate thin things for you. You can use this link also for creating paypal pro account. or

The above code will send all your information to paypal, make your payment done and send a payment status information to my site. I check the status information, if it is ok then save it to database and also you can send mail to your user. After successful payment process I redirect the user to success page. If there is some error I show the error message to user.

Now make success.php page. Here i just simply show a message, but for you, you can show any thing you want.

json date convert to timestamp in php

You can use regular expression to fetch your timestamp and offset:

preg_match('~(\d+)\d{3}((?:\+|-)\d+)~', $sale['Date'], $match);

return will be:

    [0] => 1386834199000+0200
    [1] => 1386834199
    [2] => +0200

With fetched timestamp you can now format your datetime. When formating timestamp, you can also take offset into account (given one, or set your timezone), if needed so:

$dt = new DateTime('@' . $match[1]);
$dt = new DateTime($dt->format('Y-m-d H:i:s') . ' ' . $match[2]);
# $dt->setTimezone(new DateTimezone("your_timezone"));

return will be DateTime object:

DateTime Object
    [date] => 2013-12-12 07:43:19
    [timezone_type] => 1
    [timezone] => +02:00

which can be formated for your needs:

$createdDate = dt->format('d-m-Y H:i:s');