=OTS=G-Man 26 Light Poster

TCPView from sysinternals is a good tool to see if there is a process thats sending data that you not aware of

http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx

=OTS=G-Man 26 Light Poster

Might be there are some leading \'s in your img tags.

IE
src="\images\image.jpg" = \www\images\image.jpg
src="images\image.jpg" = \www\project\images\image.jpg

Also, if by deploy you mean make accessable outside your server. Just click on the Wamp icon in the system tray and click "Put Online"

by default Wamp only allows access from localhost

Hope this helps.

=OTS=G-Man 26 Light Poster

There is 2 ways you can do this, depending on what you have available to you at the time of saving.

If you have the data that was already in the field available in a variable, then best to just use PHP to append the addition to the string.

or you can use the SQL function CONCAT() to do it for you

UPDATE myTable SET message=CONCAT(message, '$newMessage') WHERE id=$myMessageID

as for adding a timestamp or newline you can use sprintf()

$newMessage = sprintf("\n%s - %s", date("d/m/Y"), $form_newMessage);

might check syntax, writing from memory and before bed ;)

anyway, hope this helps you.

=OTS=G-Man 26 Light Poster

looks like you are missing the closing } to your switch statement

also, if I'm remembering right, the way your switch is setup, your "show" case is always going to show, because of the missing break in the "process". Might be the way you wanted it, but just in case after getting the script to run you wont be wondering why its always showing your "show" form.

anyway, hope the missing } fixes your problem.

=OTS=G-Man 26 Light Poster

mysql_fetch_array() returns an array with indexes, not field names.

You can pass the optional paramater MYSQL_ASSOC like so, mysql_fetch_array($result, MYSQL_ASSOC)

or you may use mysql_fetch_assoc() and that will return the array with field names.

Hope it helps.

=OTS=G-Man 26 Light Poster

ok, figured it out.

the issue is the base64_encode. In PHP the md5 is returned as a lowercase string and C# returns the binary of the hash, using capital letters, so to get it to work, you have to tell php to capitalize the hash string before encoding it.

in short we where encoding
098F6BCD4621D373CADE4E832627B4F6 - .NET (after converting binary to chars)
098f6bcd4621d373cade4e832627b4f6 - PHP

so this PHP

<?php

$pwd="test";
$hash = base64_encode(strtoupper(md5($pwd)));

echo $hash

?>

matches the output of

Encoding.UTF8.GetBytes(FormsAuthentication.HashPasswordForStoringInConfigFile("test", "MD5"))
a_salted_peanut commented: Simple, straight to the point, clear and consice. Has saved alot of hairloss on my part. +0
=OTS=G-Man 26 Light Poster

is the screen you are getting looks like the image attached?

if so, choose the option Disable automatic restart on system failure and see if there is a blue screen causing the restart.

On the blue screen it should have and error message on its own line in all caps, and some numbers towards the bottom, post that info here so we can further diagnose the issue.

=OTS=G-Man 26 Light Poster

to get the PHP style MD5 output you have to use FormsAuthentication.HashPasswordForStoringInConfigFile from the System.Web.Security name space.

So you will need to add the system.web.dll to your references.

Also you have to watch the encoding, to match PHP's i had to use Encoding.UTF8.GetBytes().

Thanks for asking the question, because i never knew there was a difference in the outputs.

I wrote mine in C# but should be able to translate to VB.NET pretty easy, but here is my test code

using System;
using System.Text;
using System.Web.Security;

namespace md5
{
    class Program
    {
        static void Main(string[] args)
        {
            byte[] hash = Encoding.UTF8.GetBytes(FormsAuthentication.HashPasswordForStoringInConfigFile("test", "MD5"));
            Console.WriteLine(Convert.ToBase64String(hash));
            Console.ReadKey();
        }
    }
}
=OTS=G-Man 26 Light Poster

If you try to run explorer.exe from task manager, does the desktop load?

=OTS=G-Man 26 Light Poster

Glad to have helped.

=OTS=G-Man 26 Light Poster

could just try to request the username your looking into with the profile feed

http://gdata.youtube.com/feeds/api/users/username

should get a 404 with User not found in the body, if the user is not created.or a normal feed if they exist.

More info here http://code.google.com/apis/youtube/2.0/developers_guide_php.html#Profiles

=OTS=G-Man 26 Light Poster

Well i see a few things that seem to be missing,

1) What ddanbe said, but on all of them, to see if its between should be checking for > and <

2) I dont see where you set numGrade to anything other then 0.
at the top of your button1_Click method i would expect to see like
numGrade = textbox.Text;

*just an observation, but don't need to use numGrade.ToString("F") to set the text of a textbox. just use textbox1.text = "F";

I don't want to give too much detail, cause this just has that, its home work feel ;)

johnt68 commented: Great prompting thank you +1
=OTS=G-Man 26 Light Poster

Actually I think the FileName and Arguments mixed up because the final command yours is running would look like
C:\>lease_query.pl perl lease_query.pl 192.168.0.100
and lease_query.pl is not an executable.

so i think it should be.

p.StartInfo.FileName = "perl";
p.StartInfo.Arguments = "lease_query.pl " + ipAddress;
nick.crane commented: I didn't see that. Well spotted. +1
=OTS=G-Man 26 Light Poster

Well looks like your passing the whole $_FILES array to the billede class in class.billede.php. so your changes would most likely need to be in there. But with out seeing it, cant say where in that file.

=OTS=G-Man 26 Light Poster

Well you wont be able to stop the upload itself, because it is sent with the POST. But from the looks of your script, Just need to rearrange it so that you can stop from saving script files.

Think you should do the ban check first before adding the entry to the database, then all you will have to do on a fail it delete the temp uploaded items.

=OTS=G-Man 26 Light Poster

Well to use API, i posted the link for YouTube, for other sites, best is to just google the sites name and API.

if you are looking for tutorials on the non API method, I haven't really looked for any. Best bet for that would be to look for some PHP RegEx tutorials on Google as well.

Heres a simple example that came up when searching php parse data from html - http://www.phpro.org/examples/Parse-HTML-With-PHP-And-DOM.html

Hope this helps you out

=OTS=G-Man 26 Light Poster

It's ObjectListView from http://objectlistview.sourceforge.net/cs/index.html thought the normal listview was the thing being slow, and i didn't want to write the code to do column sorting.


I do need to say that i did some research last night and downloaded the YouTube API source so i could step through the process and find what was causing it to go so slow. And i found that it is in fact, downloading the feed any time you access the Video.Entries IEnumerable. So I guess Ill have to live with it, because I want it to get all the video when ever you open the form. for for now i just read it into a List and everything goes fast after that, just uses a lot of memory (about 24MB for 468 items in the list).

I did notice however, that longest pause seems to be logging into YouYube. Because you can only get 50 videos per feed (which i think is stupid cause now they have to handle 9 requests inserted of 1), and every request it sends the auth token and pauses for about 1.5 seconds then processing the feed takes only about 1-2 seconds.

So, I might need to post over on there board to see if theres a faster way, unless anyone here know.

Thanks

=OTS=G-Man 26 Light Poster

Well, again it all depends on the site you want to search, but just run a search on there site and look at the URL (if its a GET query, POST you will have to dome a little digging).

YouTube for example looks like

http://www.youtube.com/results?search_query=cool+video&aq=f

so all you have to do is change cool+video with the term you want with URL encoding and read the return. Then you have to figure out a way to parse the HTML using some regular expressions and get the data you want.

or API

<?php
$query = $yt->newVideoQuery();
$query->setQuery($searchTerm);
$feed = $yt->getVideoFeed($query);

ListResults($feed);
?>
=OTS=G-Man 26 Light Poster

Access is not the bes Database platform unless your only expecting to use it internally and with very VERY little activity. But none the less it can be done, here is an example that shows you how, using ADODB, you can also use ODBC but I always found ADODB easier because I did not need to make a DSN for the database.

http://code.activestate.com/recipes/163447-microsoft-access-database-connectivity-dsn-less/

Hope this helps you.

=OTS=G-Man 26 Light Poster

If you are running XP Pro. you can use the net command to activate login restrictions.

From an administrator account:

1) Click the Start menu and choose Run.
2) type in cmd in the dialog that opens.
3) In the command window, type net user SiblingsAccount /time:M-F,00:00-20:00

This will limit the user SiblinsAcount to only be allowed to login during the hours listed (Midnight-8PM). You can have different times based on the day by using something like

net user SiblingsAccount /time:M-F,00:00-20:00;SA-SU,all
this will all login all day Saturday and Sunday and back to the Midnight-8PM on weekdays.

To remove all restrictions use the command net user SinlingsAccount /time:all

Hope this helps.

=OTS=G-Man 26 Light Poster

there is no native x64 version of Flash player yet.

but to install the x86 version just point your browser to http://www.adobe.com/products/flashplayer/ and follow the instructions

If you are using Internet Explorer, make sure you are not using the one with (64-bit) in the title, Flash will not install in that version.

Hope this help you.

=OTS=G-Man 26 Light Poster

If you doing a full install of Windows 7, none of the preinstalled applications will stay. The only way to use them again is if they came on a separate CD that you can install after installing 7, but manufactures rarely do that anymore now that most use a restore partition that just has an image of the drive as it shipped.

Only option to keep them would be to do a windows 7 Upgrade. Thus keeping all your files and program installed, but just upgrading Vista to 7.

=OTS=G-Man 26 Light Poster

might be better posting this in the Java section ;)

http://www.daniweb.com/forums/forum9.html

=OTS=G-Man 26 Light Poster

I added some timers to the initVideos() function

public void initVideos()
        {
            _parent.updateStatusBar("Loading your videos");
                       
            Cursor = Cursors.WaitCursor;

            _stopWatch.Start();
            _videos = getVideos();
            _stopWatch.Stop();

            Debug.Print(string.Format("_videos = getVideos(): {0}ms", _stopWatch.ElapsedMilliseconds));
            _stopWatch.Reset();

            try
            {
                _stopWatch.Start();
                oblstVideos.SetObjects(_videos);
                _stopWatch.Stop();
            }
            catch(Exception e)
            {
                MessageBox.Show("Error: " + e.Message);
            }
            
            Cursor = Cursors.Default;

            Debug.Print(string.Format("oblstVideos.SetObjects(_videos);: {0}ms", _stopWatch.ElapsedMilliseconds));
            _stopWatch.Reset();

            _parent.updateStatusBar(string.Format("Loaded {0} Video(s)", _videoCount));
        }

and the output was

_videos = getVideos(): 2656ms
oblstVideos.SetObjects(_videos);: 46045ms

=OTS=G-Man 26 Light Poster

no idea if this is how, and am just thinking about it in my head but

shouldn't the line be

dr.BackgroundColor = Color.Blue;

since dr is the row you are working on.

ddanbe commented: Good observation. +7
=OTS=G-Man 26 Light Poster

well it all depends on what the site you are searching is.

if it is YouTube they have API available to search and get all the info you need, other sites might have APIs as well.

here is youTubes PHP API reference http://code.google.com/apis/youtube/code.html#PHP

If the site doesn't have an API you could figure out there search URL and then parse the output for video info.

=OTS=G-Man 26 Light Poster

Well its good if you have user controls, VS will auto add your control to the toolbox and will also build the control when you compile your app that uses it.

also its nice when working on multiple DLLs or a project that uses DLLs that you have/written source for to have them all in one project so they all get built together and for debugging purposes.

=OTS=G-Man 26 Light Poster

the video class is right from the Google.YouTube assembly

here is the <Video> class
http://code.google.com/p/google-gdata/source/browse/trunk/clients/cs/src/youtube/youtuberequest.cs#408

and figured I would post the feed.entries code
http://code.google.com/p/google-gdata/source/browse/trunk/clients/cs/src/core/feedmodel.cs#219

Thanks for the help

=OTS=G-Man 26 Light Poster

Hello everyone,

I am working on a C# app that uses the YouTube .NET API but have come up with an issue, and I'm not sure if its the .NET Wrapper or just something I'm Doing.

Ok heres the problem, I request the list of videos the logged in user has and I get it back as a IEnumerable<video>, now from everywhere I read, IEnumerable is supposed to be better then List<T> and what not. One site showed an example of 1,000,000 Entries in IEnumerable<int> could be iterated in just over 1 second. My problem is that i have 458 Entries and its taking 45 seconds or more to populate my listview or use ElementAt() to get the video at the index of the listview (the farther down the longer, 54 being selecting the lastitem). So what am i doing wrong? or is it something with the <Video> that the IEnumerable is full of?

heres is the entire code that I'm using. including a commented part where i was just testing the time to iterate the IEnumerable.

using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using BrightIdeasSoftware;
using Google.GData.Client;
using Google.GData.YouTube;
using Google.YouTube;

namespace YTManager
{
    public partial class frmVideos : Form
    {
        private readonly mdiMain _parent;
        private readonly YouTubeRequest _ytRequest;
        //private List<Video> _videos = new List<Video>();
        private IEnumerable<Video> _videos;
        private int _videoCount;

        public frmVideos(string authToken, mdiMain parent)
        {
            InitializeComponent();
            _parent = parent;
            var settings = new YouTubeRequestSettings(mdiMain.APPLICATION_NAME, mdiMain.DEVELOPER_KEY);
            settings.AutoPaging = true;
            _ytRequest = …
=OTS=G-Man 26 Light Poster

Hello everyone,

Im trying to get my server setup for a small web hosting type system (for friends). everything is working except subdomains

ive used vhost_alias for ever when i was just hosting my site to do wildcard subdomains. But I can'e seem to get it working on more then my domain, even though they all have the same configuration.

here are my vhost files

site1.com (main site, working wildcard subdomains)

<VirtualHost *:80>
    DocumentRoot "/home/www/site1_com/public_html"
    ServerName site1.com
    ServerAlias www.site1.com
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "/home/www/site1_com/subdomain"
    ServerName everything.site1.com
</VirtualHost>

<VirtualHost *:80>
   ServerAlias *.site1.com
   UseCanonicalName Off

   LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
   CustomLog /home/www/site1_com/logs/subdomains.access.log vcommon
   ErrorLog /home/www/site1_com/logs/subdomains.error.log

   VirtualDocumentRoot /home/www/site1_com/subdomain/%1

</VirtualHost>

here is site2 (subdomains do not work, no errors in logs)

<VirtualHost *:80>
    ServerName site2.com
    ServerAlias www.site2.com
    DocumentRoot /home/www/site2_com/public_html/
    CustomLog /home/www/site2_com/logs/access.log combined
    ErrorLog /home/www/site2_com/logs/error.log
</VirtualHost>

<VirtualHost *:80>
   ServerAlias *.site2.com
   UseCanonicalName Off

   LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
   CustomLog /home/www/site2_com/logs/subdomains.access.log vcommon
   ErrorLog /home/www/site2_com/logs/subdomains.error.log

   VirtualDocumentRoot /home/www/site2_com/subdomain/%1

</VirtualHost>

Is it just not possible to do this with name based virtual hosting ??

Thanks in advance
Don G.

=OTS=G-Man 26 Light Poster

Hello everyone

I have an issue here that I couldn't find much info about, I saw a lot about it when people where selecting a lot of data but not on an insert.

Heres some background. I have an application that adds items from our in house order/inventory manager to our online store, everything was working great on the local dev server, but now when testing on the live server, I'm getting "Connection unexpectedly terminated" errors randomly through the main loop.

Heres the error:

03/12/10 17:02 E Error: Connection unexpectedly terminated
03/12/10 17:02 E    at MySql.Data.MySqlClient.PacketReader.ReadHeader()
   at MySql.Data.MySqlClient.PacketReader.OpenPacket()
   at MySql.Data.MySqlClient.NativeDriver.ReadResult(Int64& affectedRows, Int64&  lastInsertId)
   at MySql.Data.MySqlClient.CommandResult.ReadNextResult(Boolean isFirst)
   at MySql.Data.MySqlClient.CommandResult..ctor(Driver d, Boolean isBinary)
   at MySql.Data.MySqlClient.NativeDriver.SendQuery(Byte[] bytes, Int32 length, Boolean consume)
   at MySql.Data.MySqlClient.MySqlCommand.GetNextResultSet(MySqlDataReader reader)
   at MySql.Data.MySqlClient.MySqlCommand.Consume()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   at Service.PrestaShop.addItem(Product item)

in the code, right before i do the SQL for the product i check that the connection is still open using

public Boolean addItem(Product item)
{
    SrvLog.PutLog(LogLevel.D, "Adding item: " + item.Description);

    const string sql = "INSERT INTO product" +
                         "(id_product, id_supplier, id_tax, id_category_default, on_sale, ean13, price, wholesale_price, supplier_reference, location, weight, out_of_stock, active, date_add, date_upd)" +
                         "VALUES " +
                         "(?product_id, ?supplier_id, 0, ?category_id, 0, ?product_upc, ?product_price, ?product_wholesale, ?product_number, ?product_location, ?product_weight, 1, 1, CURRENT_DATE, CURRENT_DATE);" +
                       "INSERT INTO product_lang" +
                         "(id_product, id_lang, description, link_rewrite , meta_description, meta_title, name)" +
                         "VALUES " +
                         "(?product_id, 1, ?product_description, ?product_link, ?product_description, ?product_name, ?product_name);" + 
                       "INSERT INTO image" +
                         "(id_image ,id_product, position, cover)" + 
                         "VALUES " +
                         "(?product_id, ?product_id, 1, 1);" + 
                       "INSERT …
=OTS=G-Man 26 Light Poster

Darn I was thinking that was the case in the back of my mind.

I did find the Return-Path header but that doesn't seem to have the effect I'm looking for.

=OTS=G-Man 26 Light Poster

16 classes... thats all they have?

http://www.phpclasses.org/ is way better for classes even if there site is one of the ugliest sites I have ever seen :)

=OTS=G-Man 26 Light Poster

shouldn't need the LoadFile line

My full PHP stuff from mt httpd.conf is

LoadModule php5_module "d:/wamp/bin/php/php5.3.0/php5apache2_2.dll"

AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3

Hope this helps you

=OTS=G-Man 26 Light Poster

Sounds like you want a CMS (Content Management System) you can find alot of info about them at http://php.opensourcecms.com/

=OTS=G-Man 26 Light Poster

Hello, Got a question for you all.

I have a mass email script that sends emails out in a round robin using 15 unchecked email address (GoDaddy only allows something like 250 emails a day per address).

The problem I have is if an email bounces back it goes to the inbox of the sending email address.

I have put in the Reply-To: header to goto our order email and the email headers for the from address are also set to the orders email.

Preferably I would like to have bounce backs come to my email rather then hear the sales desk complain about the "crap load of emails" they will get.

So to sum up;
I want to send emails from an account like mail1/mail2/mail3..._AT_chandlermusinc.com and have the failed email attempts goto don_AT_chandlermusinc.com and the replys to goto orders_AT_chandlermusic.com

can this be done?

Thanks

=OTS=G-Man 26 Light Poster

Sorry if this is in the wrong section but there really is no category that matches what i need to ask, I only posted here because it seems a lot of Delphi people use DBISAM.

Basically, I read the manual and see where I can read the current auto_inc value of a table using LASTAUTOINC('tablename') but for some reason its not working.

here is the SQL I am trying to run

INSERT INTO ChannelListings (ChannelNo, ChannelAccountNo, ProductNo, SKU, Price, IsUseCurrentRetailPrice, IsOnSale, IsActive, IsRemove, IsDelete, IsGiftwrapAvailable, IsGiftMessageAvailable, IsUseProductNoAsSKU, CategoryNo)
VALUES (4, 2, '080689000270', LASTAUTOINC('ChannelListings'), 1.6, True, False, True, False, False, False, False, False, 20)

But when i try to run it I get the error
Expecting NULL, FixedChar, GUID, String, Memo, or BLOB expression but instead found LASTAUTOINC in INSERT SQL statment

Yet right from the DBISAM manual they show

INSERT INTO orders (custno,empno) VALUES (LASTAUTOINC('customer'),200);

Hopefully someone has used DBISAM and seen this issue

Thanks Don

=OTS=G-Man 26 Light Poster

Any specific Errors?

also I would check the SQL host, if its a shared host, they usually don't use localhost.

=OTS=G-Man 26 Light Poster

Hello everyone. I have a question here, that to me seems there must be a way to do what I want in the way I want :)

I have a thing that updates a Zen Cart DB and adds products to it.

Ok everything works the way it is now, but It close the connection to the DB after each item, is there a way to prevent this?

Little background and code

I originally tried to just null out my command but afte the first one I would get "There is already an open DataReader associated with this Connection which must be closed first."

so I searched around the internet and found something where they set the dataReader to close the connection, At that point it works, but as I said before, it disconnects and has to reconnect every item.

here is the code with before and after. any ideas would be great.

//** = points of interest

the SQL statement is 3 INSERT statements hence why i didn't have a DataReader Object originally

private static void AddZenCartItem(Product item)
        {
            Log.WriteLine("Im adding "+item.Description+" to the zencart.");

            String sql;

            //Now lets put some SQL in that String
            sql = //BIG LONG SQL STATEMENT 
            
            //Reopen the connection just incase it closed
            if (MyConn.State != ConnectionState.Open)
                MyConnect();

            MySqlCommand command = MyConn.CreateCommand();

            //**Added from the internet fix
            MySqlDataReader dataReader = null;

            try
            {
                command.CommandText = sql;
                
                //Fill in them infos
                command.Parameters.Add(new MySqlParameter("?product_id", item.SKU));
                command.Parameters.Add(new MySqlParameter("?products_model", …
=OTS=G-Man 26 Light Poster

Great, thanks for the help, I tried using sknake first, but it was having issues parsing 4 of the dates (out of 15) but the format from Ryshad fixed that.

Thanks again guys

=OTS=G-Man 26 Light Poster

Hello, I am witting some software to interact with a mail order manager. Issue is they use a strange date/time format that they store as text in the DB, from what i guessed its YYYYMMDDHHMMSSNNN

right now im using this function to get it into C# as a standard date.

private static DateTime ProcessMwTime(string mwTime)
        {
            //Mailware Date Format
            //YYYY/MM/DD HH:MM:SS.NNN
            //20090916114135766
            //2009/09/16 11:41:35.766

            DateTime thisDate = new DateTime(int.Parse(mwTime.Substring(0, 4)),
                                             int.Parse(mwTime.Substring(4, 2)),
                                             int.Parse(mwTime.Substring(6, 2)),
                                             int.Parse(mwTime.Substring(8, 2)),
                                             int.Parse(mwTime.Substring(10, 2)),
                                             int.Parse(mwTime.Substring(12, 2))
                                            );
            return thisDate;
        }

Now the question, is there a better way to do this. to me it looks lame to have to read it like that.

Thanks
Don

=OTS=G-Man 26 Light Poster

Wow, that you all for the replies, and Glad this topic helped some other people out!

And Extension methods brought to you by framework 3.x! :)

I notice you mention thats from .NET 3.x

I should say, I'm stuck using .NET 2.5 because I only have VS 2005. unless there is a way to get 2005 to use the 3.x compiler?

I was messing around with it after work and ended up just doing what jatin24 mentioned and was what i had originally but my ,and i should have been smarter, ReSharper said was redundant.

=OTS=G-Man 26 Light Poster

Hello, I am having the hardest time getting my strings to format right

I want it to only show the first 14 chars of the string. sounds simple, but I think ive been looking at the code to long to see where im messing up :).

here's the code I have

int fCount = mwReader.FieldCount;
            for ( int i = 0; i < fCount; i ++ )
            {
                Console.Write("{0,-15}", mwReader.GetName(i));
                Console.Write(" ");
            }
            Console.WriteLine("".PadLeft(80, '-'));

            while (mwReader.Read())
            {
                string description = mwReader.GetString(0);
                if (description.Length > 14)
                    description.Substring(0, 14);

                Console.WriteLine("{0,-15} {1,-15} {2,-12:C} {3,-12} {4,-12:C}",
                                      description,
                                      mwReader.GetString(1),
                                      mwReader.GetValue(2),
                                      mwReader.GetBoolean(3),
                                      mwReader.GetValue(4)
                                      );
            }

the IF statement was my last attempt to use sub string on it but even that is not working.

Here's the out put im getting

Description     ProductNo       Price           IsOnSale        SalePrice
--------------------------------------------------------------------------------

Heaven's Come To Eearth Today 080689016271    $1.60        False

Christmas Is Jesus 080689015274    $1.60        False
Child Of Light  080689014277    $1.60        False
You Love Me Still 080689008276    $1.60        False
You Are Holy    080689007279    $1.60        False
Worship Only You 080689006272    $1.60        False
Through The Fire 080689005275    $1.60        False
So Much God     080689004278    $1.60        False
Sing To The King 080689003271    $1.60        False
Sing            080689002274    $1.85        False
Praise To The Lord Almighty. 080689001277    $1.60        False

Jude Doxology   080689000270    $1.60        True         $12.95
Berceuse and Finale 00137           $60.00       False
Tell My Father  02501096        $1.80        False

I want it to look like

Description     ProductNo       Price           IsOnSale        SalePrice
--------------------------------------------------------------------------------
Heaven's Come T 080689016271    $1.60        False
Christmas Is Je 080689015274    $1.60        False
Child …
serkan sendur commented: i like the way you ask, it is clear +9
=OTS=G-Man 26 Light Poster

Well only issue there is, the site is hosted at GoDaddy, so cant do anything like that.

I did come up with something that works for now, Because default.html was used to just redirect people into a subfolder (where the old site was moved to) i did this

RewriteCond %{REMOTE_ADDR} !^71\.211\.xx\.xx
RewriteCond %{REQUEST_URI} !/tmp_site/
RewriteCond %{REQUEST_URL} !^cmas-email-flyer09.jpg$ //just becasue sales had just sent a mass email with the image in the root. 
RewriteRule (.*) /tmp_site/$1 [L,R=302]

Hope that helps people if they run into a similar situation.

sknake commented: clever +8
=OTS=G-Man 26 Light Poster

Hello, I was wonder if it is possible to change the DirectoryIndex based on the incoming IP address.

Heres a senerio.

We are working on a new site for our company and are doing redirection to pass users to a temp site in a sub folder.

but for us internally, we can goto /index.php and see the new site.

The issue is, is the new site has SEO friendly URLs and wont work if we actually have index.php in the URL, it needs to be just the domain name

so we want to have something like this

if (%{REMOTE_HOST} 71\.211\.XX\.XX)
{
    DirectoryIndex index.php
}
else 
{
    DirectoryIndex default.html
}

Thanks

=OTS=G-Man 26 Light Poster

yes pleases get rid of that overly complicated date assignment

$today = date("m/d/Y");

just the thought of the wasted bits of memory is killing me

=OTS=G-Man 26 Light Poster

Hello, I'm having an issue getting my redirect working and I think its just because Ive been looking at it too long.

Ok here it goes, I have 2 redirects going on because of the amount of domain names and old links coming to the different sites.

First heres the folder layout

in the root, we have the main site, then in a sub folder "/churchinstrumentalist.com" we host a separate site but it used to be just in "/churchinstrumentalist" so in the root folder the .htaccess is

RewriteEngine On
RewriteRule churchinstrumentalist/?(.*) http://www.churchinstrumentalist.com/$1 [R,NC]

*http://www.churchinstrumentalist.com/ is the new, main, domain that points to the /churchinstrumentalist.com folder

This seems to be working right, because heres an example URL

http://www.chandlermusic.com/churchinstrumentalist/catalog/detail.asp?page=browse&nprdate=&ic=15&pub=16&op=&keywords=&inst=&occ=&pid=7688&thispage=results.asp

gets changed to

http://www.churchinstrumentalist.com/catalog/detail.asp?page=browse&nprdate=&ic=15&pub=16&op=&keywords=&inst=&occ=&pid=7688&thispage=results.asp

Now inside the /churchinstrumentalist.com folder i have another htaccess that handels the bulk of the changes and they all work except the one that checks if the URL contains /catalog/detail.asp

here is the htaccess in that folder

ErrorDocument 404 /?404,136
RewriteEngine On

#Route instrumentalsource.com -> churchinstrumentalist.com
RewriteCond %{HTTP_HOST} instrumentalsource.com$
RewriteRule ^(.+) http://www.churchinstrumentalist.com/$1 [L,R]

#Route theinstrumentalsource.net -> churchinstrumentalist.com
RewriteCond %{HTTP_HOST} theinstrumentalsource.net$
RewriteRule ^(.+) http://www.churchinstrumentalist.com/$1 [L,R]

#Route anylinks to detail.asp to search
RewriteRule ^catalog/detail\.asp.+pid=([a-zA-Z0-9]*).* http://www.churchinstrumentalist.com/?search-results,4&sPhrase=$1 [R]   <--  line that seems to be failing

#Route any links to old subfolders to site root now
RewriteRule publishers(/)?.* http://www.churchinstrumentalist.com/ [R,NC]
RewriteRule order(/)?.* http://www.churchinstrumentalist.com/ [R,NC]
RewriteRule …