1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

rewrite with a script?

Discussion in 'PHP' started by bleak, Nov 10, 2005.

Thread Status:
Not open for further replies.
  1. #1
    how could i enable a pre-written froogle feed script to work with my mod_rewrite url's?

    default url's (which the froogle feed works with): www.yourwebsite.com/product_info.php?products_id=0

    rewritten url's: www.yourwebsite.com/product/product_name-item_name.html





    the script in question i would like to use (i'm only posting the beginning of it, as that is where all of the url works are.. if the entire script is needed, let me know and i will post it):
    
    $OutFile = "../feeds/your-fr-outfile.txt"; //"CHANGEME-full-path-to-file-with-777-dir-and-file-permissions.fr-outfile.txt";
    $destination_file = "your-fr-outfile.txt";  //"CHANGEME-filename-to-upload-to-froogle.txt" ;
    $source_file = $OutFile;
    $imageURL = 'CHANGEME-http://www.yourwebsite.com/yourimagesdirectory/';
    $productURL = 'CHANGEME-http://www.yourwebsite.com/product_info.php?products_id=';
    $already_sent = array();
    
    $home = "localhost" ;
    $user="CHANGEME-sql-db-user";
    $pass="CHANGEME-sql-db-user-password";
    $base="CHANGEME-name-of-sql-database";
    
    $ftp_server = "hedwig.google.com" ;
    $ftp_user_name = "CHANGEME-froogle-username";
    $ftp_user_pass = "CHANGEME-froogle-password";
    $ftp_directory = ""; // leave blank for froogle
    
    $taxRate = 0; //default = 0 (e.g. for 17.5% tax use "$taxRate = 17.5;")
    $taxCalc = ($taxRate/100) + 1;  //Do not edit
    $convertCur = false; //default = false
    $curType = "USD"; // Converts Currency to any defined currency (eg. USD, EUR, GBP)
    if($convertCur)
    {
    $productURL = "CHANGEME-http://www.yourwebsite.com/product_info.php?currency=" . $curType . "&products_id=";  //where CURTYPE is your currency type (eg. USD, EUR, GBP)
    }
    Code (markup):
     
    bleak, Nov 10, 2005 IP
Thread Status:
Not open for further replies.