Results 1 to 5 of 5
August 19th, 2010, 05:55 PM #1
Are Link Subscription Filenames COMPLETELY random?
- Join Date
- May 8th, 2010
WHAT The hell is that giant random string (the last part before .txt) in the filename? Am I supposed to be expecting just a completely different filename each day, with no way to predict it? On 6/24 they added this worthless junk.
August 19th, 2010, 07:51 PM #2
Looks like they changed the file name format on 4/29 and then again on 6/29. I must be coded to grab the newest file regardless of the file name because they are still being imported into my database.
You may have to contact their support if you can't make it work, as they rarely post here any more except for new program announcements.
August 20th, 2010, 10:03 AM #3
I feel your pain.
John. Can you give any hints on how to grab the last file? It looks like its standard up to the date, then there are random 13 characters. I was a math major and do know how to do some code analysis but I don't think NASA scientists can break that 13 number code. I image you can look for a file that starts with a certain say 10 characters and ignore the rest of the file name, just not sure what that php function might be?
Or, I guess what you could do. Keep new files in 1 folder. After they are processed, moved those to the processed folder. Then, hopefully, there should only be 1 file in the 'unprocessed' folder. But that's assuming GAN only sends 1 file a day...
Last edited by gcarson; August 20th, 2010 at 10:10 AM.
August 20th, 2010, 10:28 AM #4
I create this function:
// To pick the newest feed of Orange links from Performics
// store all .txt names in array changed 3/13/2009
$p = opendir($path);
while (false !== ($file = readdir($p)))
if (strstr($file, ".txt"))
$list = $path . $file;
// sort array descending
// return newest file name
$path = BASE_URI . 'perforange/';
// Get the newest OrangeLinks file only
$single_file = get_newest_file($path);
$feed = fopen($single_file, 'r');
August 20th, 2010, 10:35 AM #5
Awesome. That's why I love coding. So many ways to accomplish the same goal. Never thought of it that way but I can see how it works. Thanks for the share as I'm sure it will help a lot of people out!
By Uncle Rico in forum Google Affiliate Network - GANReplies: 4Last Post: November 19th, 2009, 07:02 PM
By Uncle Rico in forum Google Affiliate Network - GANReplies: 4Last Post: April 30th, 2009, 09:41 AM
By Nature Boy in forum WebMerge (Fourthworld.com)Replies: 4Last Post: June 2nd, 2004, 08:58 PM
By freetweak in forum Programming / Datafeeds / ToolsReplies: 1Last Post: October 20th, 2001, 02:54 PM