![]() |
small script help to veify websites...
anyone can hook me up with a simple php script where you can load a list of websites... then the script loads a website and checks view source for whatever text I specify, and if it finds text that I specified it will save that URL as a valid url into a valid.txt file, if it does not find what I specify in view source it will ignore it and put it into bad.txt ... :helpme
|
Code:
<?php |
Quote:
|
Quote:
PHP Code:
|
Quote:
$pass = array(pass.txt); $fail = array(fail.txt); when I run it, it's doing something, but i don't see good/bad urls going to txt files |
|
Quote:
|
Well if you don't mind either waiting for someone to complete it for you, or until I finish writing my class that does exactly what you want, I'll give you the url to either view it (if I decide to give it free), or to buy it. :)
|
At least substr_count() isn't strstr(), which most people don't count '0' as being valid. But lots of luck with finding an exact pattern match. Might as well be doing 'view source' by hand.
If you're trying to confirm a link trade, just use a pre-existing script. There's tons to choose from. |
can somebody finish the script, i'll epass $10 to whoever can get it right... script should be able to handle 2-5000 urls
|
LOL $10 bucks.... that's awesome offers.
|
Quote:
|
I'll chime in...
PHP Code:
|
Quote:
leave your epass id as well :) |
What problem are you having? It is loading one URL at a time and a timeout seems unnecessary?
|
Quote:
|
You can use the sleep() function.
PHP Code:
|
Quote:
|
Yes, it creates the full text file before writing it. You could write each time but at 5000+ times that could cause some issues. Unless absolutely necessary, I wouldn't do it that way. Here is the code anyways.. :)
PHP Code:
|
Sorry that code has a problem in Windows, this should do the trick.
PHP Code:
|
I've gotta admit, I've never seen a filemode of 'at' before.
|
I suggest you hire a developer.
|
Code:
Windows offers a text-mode translation flag ('t') which will transparently translate \n to \r\n when working with the file. In contrast, you can also use 'b' to force binary mode, which will not translate your data. To use these flags, specify either 'b' or 't' as the last character of the mode parameter. |
Quote:
From a design standpoint - other than it since being asked for, I'm curious why you killed the pass/fail arrays - that was the only part of the code that I thought was salvageable. |
Quote:
|
Quote:
|
i don't get it, why did it stop working, everything goes to invalid txt now.... hrm
|
PHP Code:
|
All times are GMT -7. The time now is 02:47 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123