aRo`

automating your e-commerce

Just a quick not on mod_rewrite & wordpress.
If you want to write your own .htaccess code in combination with wordpress you have to put it above the default wordpress code.
<ifmodule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^arolabs\.com$ [NC]
RewriteRule ^(.*)$ http://www.arolabs.com/$1 [R=301,L]
</ifmodule>
# BEGIN WordPress
<ifmodule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</ifmodule>
# END WordPress

I have several niche price comparison sites where i need to update my productlist on a regular basis. When a merchant delivers his datafeed from his webserver(http://domain.com/feed.csv) you can use php's filecopy function.
Other merchants only offer an option to fetch there datafeed from an FTP server(ie shareasale merchants). This is where the code below offers [...]

If you want to add a feature to your website that shows the loading time of the page just impliment the code below.
Offcourse php is a serverside language so the result is the time needed to generate the html on the server. This does not include sending the page back to the browsers who [...]

Parse error: syntax error, unexpected T_STRING in /mounted-storage/home118b/sub001/sc16660-QHQQ/www/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()'d code on line 4

This little scripts create's a backup of your database and website files at once and puts them on a folder on your webhosting.
PLAIN TEXT
PHP:

function backupDB($dbhost,$dbuser,$dbpass,$dbname, $sitename){

global $savepath , $date ;

 

$date = date("dmY");

if (!file_exists("$savepath/$date")) {

mkdir("$savepath/$date", 0777);

}

$filename = "$savepath/$date/SQL$sitename-$date.sql";

 

passthru("mysqldump --opt -h$dbhost -u$dbuser -p$dbpass $dbname&gt;$filename");

 

}

PLAIN TEXT
PHP:

function backupWWW($wwwdirectory,$wwwname){

global $savepath , $date ;

if (!file_exists("$savepath/$date")) {

mkdir("$savepath/$date", 0777);

}

$filename = "$savepath/$date/WWW$wwwname.tar.gz";

 

$zipline = [...]

« Previous Page« Previous Entries  Next Entries »Next Page »