Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 23-12-04
stevenm's Avatar
Registered User
 
Join Date: Aug 2004
Posts: 699
Thanks: 0
Thanked 0 Times in 0 Posts
stevenm is an unknown quantity at this point
  Feed Insertion PHP script?

Hi guys

I'm looking for a feed insertion php script that will allow me to grab selected feeds from AW or Buy.at and insert them into my database automatically.

If anyone has a script they would be willing to share it would be much appreciated.

Warmest wishes.

Steven
--
Virtual Cards UK
http://www.virtualcards.co.uk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 30-12-04
lakrasia's Avatar
Dot Com Pennyaire
 
Join Date: Jan 2004
Location: this month, Guatemala
Posts: 626
Thanks: 0
Thanked 0 Times in 0 Posts
lakrasia is an unknown quantity at this point
Hi Steven,
I find the easiest way is to use phpMyAdmin - insert text from file.

You can manipulate one of the files in Excel (play around with the columns and record what you do in a macro) to make them match up.
__________________
I used to have an open mind but my brains kept falling out.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 30-12-04
morleymouse's Avatar
Super Member
 
Join Date: Aug 2003
Location: Costa Del Sheffield
Posts: 2,752
Thanks: 3
Thanked 10 Times in 6 Posts
morleymouse is an unknown quantity at this point
obviously just the basics.... (all php)

## connect to your database stuff...

$row = 1;
$handle = fopen("$datafeed","r");
while ($data = fgetcsv ($handle, 100000, ",")) {
$row++;
// opens the file specified by $datafeed and calls all the columns $data[...]

$sql = "INSERT INTO tablename (all,your,stuff)
VALUES ('$data[0]', '$data[1]', '$data[2]')";

// where $data[0] is the first column, $data[1] is the second etc from the CSV file.

$result = mysql_query($sql);

}
fclose ($handle);

## close database connection

once you know which feed your using, you can do like str_replace on certain things to make it all tidy.

For datafeeds that are zipped you can use gzopen instead of fopen

lakrasia, this way saves you downloading the feeds, which can take a while. and it does all the matching up for you, which is always nice

hope its of use
__________________
Dan Morley
Alpharooms.com
daniel at alpharooms dot com - Hotels, Flights, Airport Transfers, Care Hire + More! sign up
My Blog | Cheap Holidays
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 30-12-04
lakrasia's Avatar
Dot Com Pennyaire
 
Join Date: Jan 2004
Location: this month, Guatemala
Posts: 626
Thanks: 0
Thanked 0 Times in 0 Posts
lakrasia is an unknown quantity at this point
Hi, thanks from me too, then. I tend to stick with anything that works, but I can see a few benefits from using a script instead.
__________________
I used to have an open mind but my brains kept falling out.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Affiliate Marketing RSS Feeds - Contact Us - Affiliate Marketing - Archive - Privacy Statement - Top

Content Relevant URLs by vBSEO 3.2.0 RC7