aRo`

automating your e-commerce

paypal ipn postback on a custom port.

When we were developping the paypal IPN script for our ecommerce project solidshops.com, we ran into a strange limition.

Apparently paypal does not allow you to post back to a url with a custom port. Only http(80) and https(443) are allowed.

We solved it by using the paypal ipn proxy below. You should put this script on a different server and it will post all the IPN data to your application on port 8080.

The $url should be changed to the webapplication(on custom port) where the paypal data is processed.

PHP:
  1. $url = 'http://www.yourdomain.com:8080/ipnscript.php';
  2.        
  3. $posted = $_POST;
  4. if (count ( $posted )> 0) {
  5.     foreach ( $posted as $key => $value ) {
  6.         $fields [$key] = $value;
  7.     }
  8.            
  9.     //url-ify the data for the POST
  10.     foreach ( $fields as $key => $value ) {
  11.         $fields_string .= $key . '=' . $value . '&';
  12.     }
  13.     rtrim ( $fields_string, '&' );
  14.            
  15.     //open connection
  16.     $ch = curl_init ();
  17.            
  18.     //set the url, number of POST vars, POST data
  19.     curl_setopt ( $ch, CURLOPT_URL, $url );
  20.     curl_setopt ( $ch, CURLOPT_POST, count ( $fields ) );
  21.     curl_setopt ( $ch, CURLOPT_POSTFIELDS, $fields_string );
  22.            
  23.     //execute post
  24.     $result = curl_exec ( $ch );
  25.            
  26.     //close connection
  27.     curl_close ( $ch );
  28. }

Popularity: 1% [?]

This is an awesome feature of MS visio that a lot of poeple don't know. I use it mostly for documentation purpuses at the end of a development cycle.

1. Enable your MySQL to listen for network connections.
2. Allow privileges for your MySQL for the XP client to connect
3. Install the MySQL ODBC connector
http://www.mysql.com/products/connector/j/
4. Create the ODBC connector
On the windows machine:
Control Panel → Administrative Tools → Data Source (ODBC)
Click on System DSN, then click Add...
Choose MySQL ODBC 5.1 Driver

From there add the Data Source name, Can be anything you want.
Then add the server, user, pass & database info.

5. Open up Visio
6. File → New → Software and Database → Database Model Diagram
6. From the menu, select Database → Reverse Engineer
7. Select the Data Source name
8. Click Next >
9. Enter your password, and click OK
10. Select all tables or views you wish to reverse engineer

source: ubuntuforums

Popularity: 22% [?]

an overview of ecommerce solutions

What ecommerce software would you use ?

Browser-Based Storefront Creation Services

* Shopify - http://www.shopify.com
* Big Cartel - http://www.bigcartel.com
* Nascent Commerce - http://www.nascentcommerce.com
* Yahoo! Stores - http://store.yahoo.com
* PayPal - http://www.paypal.com
* BizLand - http://www.bizland.com
* Mercantec SoftCart - http://www.mercantec.com
* MerchandiZer (HipHip Software) - http://www.merchandizer.com
* ShopSite - http://www.shopsite.com
* Big Step.com - http://www.bigstep.com
* HyperMart - http://www.hypermart.com
* Miva Merchant - http://www.miva.com
* Monster Commerce - http://www.monstercommerce.com
* Shopping Q - http://www.shoppingq.com
* Actinic - http://www.actinic.com
* Mals E-Commerce - http://www.mals-e.com
* ClickCartPro - http://www.clickcartpro.com
* FlashECom Cart (hosted solution) - http://www.flashecom.com
* SWREG - http://www.swreg.com
* Nexternal - http://www.nexternal.com
* CubeCart - http://www.cubecart.com/site/home/
* Demandware - http://www.demandware.com

FREE Browser-Based Storefront Creation Services

* FreeMerchant - http://www.freemerchant.com

Shopping Cart Solutions

* Avactis - http://www.avactis.com/
* Cart32 - http://www.cart32.com
* CartIt - http://www.cartit.com
* EasyCart - http://www.easycart.com
* PDG Shopping Cart - http://www.pdgsoft.com
* QuikStore - http://www.quikstore.com
* smc WebStore - http://www.smctechnologies.com
* Midi Cart - http://www.midicart.com
* Dansie Shopping Cart - http://www.dansie.net/cart.html
* Sales Cart - http://www.salescart.com
* Retail Cart - http://www.retailcart.com
* X-Cart - http://www.x-cart.com
* EDatCat - http://www.edatcat.com
* VP*ASP - http://www.vpasp.com
* Bazaar Builder = http://www.bazaarbuilder.com
* XMart eCommerce = http://www.digitalplacebo.com
* Ecommerce Templates - http://www.ecommercetemplates.com
* ASPX Shop - http://www.aspxshop.com
* ASP DotNet Storefront - http://www.aspdotnetstorefront.com/
* DigiShop - http://digishop.sumeffect.com/
* PHPCart - http://www.phpcart.net

FREE Shopping Cart Solutions

* PHPCart - http://www.phpcart.com
* OS Commerce - http://www.oscommerce.com
* PHP Shop - http://www.phpshop.org
* Agora Cart - http://www.agoracart.com
* AFCommerce - http://www.afcommerce.com
* ZenCart - http://www.zencart.com
* Magento - http://www.magentocommerce.com/

Advanced eCommerce Systems

* Interchange - http://www.icdevgroup.org
* Broadspire Small Business Web Stores - http://www.smallbusinesswebstores.com/
* MarketLive - http://www.marketlive.com
* Blue Martini Software's Customer Interaction System - http://www.bluemartini.com
* IBM WebSphere Commerce Suite - http://www.ibm.com/websphere
* Intershop Communications' Enfinity - http://www.intershop.com
* Microsoft Commerce Server - http://www.microsoft.com
* ICN Software's AceFlex B2C - http://www.icnsoftware.com
* INetStore - http://www.inetstore.com
* MerchantSpace - http://www.merchantspace.com
* Elasticpath- http://www.elasticpath.com

Popularity: 26% [?]

do you trust your webhost ?

This question is fair and simple: Do you trust your webhost ?

I was worried about it when i was browsing through the FAQ of my webhost. I opened the topic "How to redirect my site so it always appear with www.?" and this is what i saw...

servage faq

You should know that codehomepage.com was my previous domain. It still redirects to arolabs.com.
At least they could have changed the domain name here...

I don't really care they used my code, but it would have been nice they told me they're going to use it. Or give me some free hosting...

Now this redirect script is something that's available all over the net, but what about your own coded applications ? They could just zip it and sell it !

That's the reason all my profesional websites are hosted on a dedicated server.

Do you think your website is save with your current hosting provider ? (Even if your not on a shared hosting account).

add to digg

Popularity: 74% [?]

This is an example with a

headline

`

This php script will send you a mail with all the files that have been changed within an interval you specify.

I created this script because someone hacked into my shared hosting account and added some hidden spammy link into my templates. And since most shared hosting accounts do not have any kind of logfiles available, it is almost impossible for you to find out how the hacker got in. I could even be, the hacker got acces to your files by hacking another shared hosting account on that server.

With this script you will at least be notified when someone has changed the files on your server.

settings:

PHP:
  1. $from="name@domain.com";
  2. $to="name@domain.com";
  3. $subject="changes on webhosting";
  4. $domain = "yourdomain.com";
  5.  
  6. $settings = array( array(
  7.                 wwwname => 'htdocs1',
  8.                 wwwdirectory => '/mounted-storage/home/website1.com'
  9.             ),
  10.             array(
  11.                 wwwname => 'htdocs2',
  12.                 wwwdirectory => '/mounted-storage/home/website2.com'
  13.             )
  14.          );

functions

PHP:
  1. function url_remove_lastslash($url){   
  2.     if (substr($url,strlen($url)-1,1)=="/"){
  3.         return substr($url,0,strlen($url)-1);
  4.     }else{
  5.         return $url;
  6.     }
  7. }
  8.  
  9. $resultsarray();
  10. function getfiles($path_start) {
  11.     global $results;
  12.     $dir = @opendir($path_start);
  13.     while (false!=($file = @readdir($dir))) {
  14.         if ($file != "." && $file != "..") {
  15.        
  16.             $file_path = url_remove_lastslash($path_start) . "/"$file;
  17.             if(is_dir($file_path)){
  18.                 getfiles ($file_path);
  19.             }
  20.             $date_mod = filemtime($file_path); //get last modified date of file
  21.             if(trim($date_mod) <> ""){
  22.                            
  23.                 $date_mod = date("Y-m-d", $date_mod);         
  24.                 $yr = substr($date_mod,0,4); //display 'new' image if item not-older than 7days
  25.                 $mnth = substr($date_mod,5,2);
  26.                 $dy = substr($date_mod,8,2);
  27.                 $newday = date("Y-m-d", mktime(0,0,0,$mnth,$dy + 2,$yr));
  28.                 $now = date("Y-m-d");
  29.                 //echo $yr .$mnth . $dy."<br>";
  30.                
  31.                     if (($now <= $newday)  ) {
  32.                         //echo $file_path . " " . $date_mod  . " " . $now  . " " . $newday. $yr .$mnth . $dy."<br>";
  33.                         $results[$file_path][0] = $file_path ;
  34.                         $results[$file_path][1]$date_mod;
  35.                     }
  36.             }
  37.  
  38.         }
  39.  
  40.     }
  41. }

check all hosting accounts & create mailbody

PHP:
  1. foreach ($settings as $setting){
  2.     $resultsarray();
  3.     $date_change = "";
  4.     $filename= "";
  5.    
  6.     getfiles($setting['wwwdirectory']);
  7.    
  8.     $mail_body .=  "<b>".$setting['wwwname']."</b><br/>";
  9.    
  10.     //sort by change date
  11.     foreach ($results as $key => $row) {
  12.         $date_change[$key]  = $row[0];
  13.         $filename[$key] = $row[1];
  14.        
  15.     }
  16.    
  17.     //array_multisort($filename, SORT_DESC, $date_change, SORT_ASC, $results);
  18.    
  19.     foreach ($results as $result){
  20.         $mail_body .=  $result[1] . ": " . str_replace($setting['wwwdirectory'],"",$result[0])."<br/>";
  21.     }
  22.    
  23. }

mail the changed files

PHP:
  1. $headers="";
  2.    $headers .= "X-Sender:  $from <$from>\n"; //
  3.    $headers .="From: $from <$from>\n";
  4.    $headers .= "Reply-To: $from <$from>\n";
  5.    $headers .= "Date: ".date("r")."\n";
  6.    $headers .= "Message-ID: <".date("YmdHis")."$from>\n";
  7.    $headers .= "Subject: $subject\n";
  8.    $headers .= "Return-Path: $from <$from>\n";
  9.    $headers .= "Delivered-to: $from <$from>\n";
  10.    $headers .= "MIME-Version: 1.0\n";
  11.    $headers .= "Content-type: text/html;charset=ISO-8859-9\n";
  12.    $headers .= "X-MSMail-Priority: Normal\n";
  13.    $headers .= "X-Mailer: Mail send from ".$domain."!\n";
  14.  
  15.    //mail to customer
  16.    if(mail($to,$subject,$mail_body,$headers)){
  17.      echo "job executed succesfully";
  18.    }else{
  19.         echo "error executing job";
  20.    }

You can download a copy of phpHackChecker here. Change the file extension to ".php".

Popularity: 24% [?]

« Previous Entries  Next Page »