Greetings!
Sorry I didn't make an introduction thread but I needed a quick bit of help here from the WickedFire crew, If anyone could help me that would be great and appreciated, again I apologize for not making a introduction, and if you all want me to I'll gladly go make one.
On with the problem!
Ok so I have good friend in the same industry as I am, he wanted to trade links with me, so is said sure, so he gave me a big list of links that he had so that I could put it in my directory, and I have a txt file with a list of all my links from my site in it, basically what I want to do is make a PHP script that compares both lists of links and return an array(list) the links that he has and I don't, basically I don't want duplicates, I don't want to put one of his links in and discover later that I already had it! Now I've made a little script like this before and I simply used array_diff() to find the difference, now the problem with my current situation is that I need the category from his links so I know where to put mine, here's an example:
My list:
http://www.blahblah.com/blablah/blah.html
http://www.blahblah.com/blablah/blah.html
http://www.blahblah.com/blablah/blah.html
His list:
<li><a href="http://blah.com/tutorials/lol.html">Tutorials</a>
<li><a href="http://www.blablah.com/cars/cars.html">Cars</a>
<li><a href="http://www.blahsasdasd.com/weather/weather.html">Weather Information</a>
Now the task here is to compare both of these lists together to strip out the links that I already have in my link file and create a new text file with all the links in his file that I don't have, BUT the challenge is to KEEP the link structure INTACT, I NEED an WANT those tags in that output file, but I have no idea how to compare both files without stripping out the tags and categorys!
If anyone could help it would be much appreciated, thanks!
is0
Sorry I didn't make an introduction thread but I needed a quick bit of help here from the WickedFire crew, If anyone could help me that would be great and appreciated, again I apologize for not making a introduction, and if you all want me to I'll gladly go make one.
On with the problem!
Ok so I have good friend in the same industry as I am, he wanted to trade links with me, so is said sure, so he gave me a big list of links that he had so that I could put it in my directory, and I have a txt file with a list of all my links from my site in it, basically what I want to do is make a PHP script that compares both lists of links and return an array(list) the links that he has and I don't, basically I don't want duplicates, I don't want to put one of his links in and discover later that I already had it! Now I've made a little script like this before and I simply used array_diff() to find the difference, now the problem with my current situation is that I need the category from his links so I know where to put mine, here's an example:
My list:
http://www.blahblah.com/blablah/blah.html
http://www.blahblah.com/blablah/blah.html
http://www.blahblah.com/blablah/blah.html
His list:
<li><a href="http://blah.com/tutorials/lol.html">Tutorials</a>
<li><a href="http://www.blablah.com/cars/cars.html">Cars</a>
<li><a href="http://www.blahsasdasd.com/weather/weather.html">Weather Information</a>
Now the task here is to compare both of these lists together to strip out the links that I already have in my link file and create a new text file with all the links in his file that I don't have, BUT the challenge is to KEEP the link structure INTACT, I NEED an WANT those tags in that output file, but I have no idea how to compare both files without stripping out the tags and categorys!
If anyone could help it would be much appreciated, thanks!
is0