![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Retired
Industry Role:
Join Date: Dec 2002
Posts: 20,956
|
need a PHP script coded
should be simple
take a list of URLs I provide, check each one of them for a 404 response. If it gets that response, tell me which URL did it. There are hundreds to check paypal is ready to go |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
So Fucking Banned
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
|
show me your penis please
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Jul 2001
Location: 127.0.0.1
Posts: 9,266
|
I already did it for you, please send $100 via paypal
__________________
This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truth |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
Retired
Industry Role:
Join Date: Dec 2002
Posts: 20,956
|
Quote:
thats also not PHP |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Industry Role:
Join Date: Jul 2001
Location: 127.0.0.1
Posts: 9,266
|
Quote:
![]()
__________________
This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truth |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Jan 2007
Location: Mid-West!
Posts: 1,575
|
Didn't Xenu throw the Thetans into a volcano? That bastard!
__________________
The Abbie*Cash Porn Network. Billing processing by CC*BILL. Join our affiliate program today.
RealDollSex | AbbieTeen | GamerChicks | ModelTexans | HottieCams ![]() Nintendo 3DS Porn Blog | Steve's Adult Industry Blog | Abbie Bueller's Porn Blog |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Let's do some business!
Industry Role:
Join Date: Sep 2004
Location: Austin, TX
Posts: 31,323
|
Quote:
He wants the program to feed in a list of addresses. Go to each address and see if the site/file exists. Create and output list of addresses that return a 404.
__________________
Vacares - Web Hosting, Domains, O365, Security & More - Paxum and BTC Accepted Windows VPS now available Great for TSS, Nifty Stats, remote work, virtual assistants, etc. Click here for more details. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
MOBILE PORN: IMOBILEPORN
Join Date: Jan 2004
Location: Tinseltown NL
Posts: 16,502
|
PHP Code:
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
MOBILE PORN: IMOBILEPORN
Join Date: Jan 2004
Location: Tinseltown NL
Posts: 16,502
|
oh, i forgot you need the php_http extension installed on your server.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
This is kind of simple. Do you just want it to report 404s? How do you want to 'feed' it?
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Industry Role:
Join Date: Aug 2001
Location: Nomad
Posts: 5,196
|
script in my sig does that!
__________________
. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
Quote:
![]()
__________________
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 | |
Confirmed User
Join Date: Aug 2006
Posts: 268
|
Here's a version that uses curl:
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
![]() This one's stupid, but it uses the common class.curl.php, and does a select based upon the error, so you can add different features/functions for 403s, 500s, etc.. Mostly, I'm just lazy and didn't figure it deserved OOP, even if I'm using an OOP class. Enjoy. Code:
<html> <head> <Title>404 Test Thingy or whatever</title> </head> <body bgcolor="#ffffff" text="#000000" link="#0000ff"> <br> <form method="post"> <div align="center"><strong>Test URLs:</strong><br> <textarea name="urls" id="urls" cols="45" rows="5"><?=isset($_REQUEST['urls'])?$_REQUEST['urls']:"";?></textarea> <br> <input type="submit" name="submit" id="submit" value="Check Response"> </div> </form> <?php // This is hardly an example of good PHP. Ugh. @require_once("class.curl.php"); // trim() to get rid of errant enter keys. $myurls = (isset($_REQUEST['urls'])?explode("\n", trim($_REQUEST['urls'])): array()); foreach ($myurls as $url) { // use our cURL class. $curlInit = new curl($url); // Make sure we don't follow redirects. $curlInit->setopt(CURLOPT_FOLLOWLOCATION, FALSE) ; // Do it. $curlInit->exec(); // If we returned a connection error, say so. if ($myError = $curlInit->hasError()) { echo "ERR: $url ($myError)<br>\n"; } else { // Reinit our array $status = array(); // Seems to have worked, parse it. if (is_array($curlInit->m_status)) $status = $curlInit->m_status; // Simple error checking. if (!empty($status)) { switch($status["http_code"]) { case "404": echo "<font color='red'>404</font>: <a href='$url' target='_new'>[link]</a> $url<br>\n"; break; default: // Do nothing if not 404, I guess. break; } } } // We're done, close the socket. $curlInit->close(); } ?> </body> </html>
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 | |
Confirmed User
Join Date: Aug 2006
Posts: 268
|
rofl
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
I dunno if I'd give it ratings that high. There's gonna be someone who needs urldecode, someone with a bizarre gpg setting, and.. oh god fuck PHP.
![]() At least I can rely on trusty ol' cURL to almost always be there. fopen urls and http_get don't usually worked no more on crummy virtualhosts, but cURL? Most of the time. I almost turned headers on and NOBODY to use a HEAD to parse with less overhead, but the class is oddly lacking in the ability to handle that.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 | |
Confirmed User
Join Date: May 2005
Posts: 2,737
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 |
rockin tha trailerpark
Industry Role:
Join Date: May 2001
Location: ~Coastal~
Posts: 23,088
|
how about the same script that looks for txt on the index, instead of a response code
like the text "this site does not exist" how would ya do that in curl/php? That might be even more fool proof for him. Sometimes servers return bad codes even if the site isn't bad. This would foolproof it.
__________________
__________ Loadedca$h - get sum! - Revengebucks - mmm rebills! - webair (gotz sErVrz) ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 | |
Retired
Industry Role:
Join Date: Dec 2002
Posts: 20,956
|
Quote:
Hillsborough on ICQ made exactly what I needed, not sure what his name is on GFY |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 | |
Confirmed User
Join Date: May 2005
Posts: 2,737
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#21 | |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
Quote:
Code:
<html> <head> <Title>404 Test Thingy from hell</title> </head> <body bgcolor="#ffffff" text="#000000" link="#0000ff"> <br> <form method="post"> <div align="center"><strong>Test URLs:</strong><br> <textarea name="urls" id="urls" cols="45" rows="5"><?=isset($_REQUEST['urls'])?$_REQUEST['urls']:"";?></textarea> <br> <input type="submit" name="submit" id="submit" value="Check Response"> </div> </form> <?php // BE SAFE: WRAP YOUR CRAP! if (!function_exists('findCurlCli')) { function findCurlCli() { $curlClis=array( '/usr/bin/curl', '/usr/local/bin/curl', '/usr/bin/curl-cli', '/usr/local/bin/curl-cli', '/usr/bin/curlcli', '/usr/local/bin/curlcli', '/usr/bin/curl-cli', '/usr/local/bin/curl-cli', // FOR SOME REASON THIS DOESNT WORK!!!!! // '/usr/bin/wget', '/usr/local/bin/wget' ); foreach ($curlClis as $curlcli) { if (@is_file("$curlcli") && is_executable("$curlcli")) { return("$curlcli"); break; } else { return FALSE; } } } } // lol if ($foundCurl = findCurlCli()) { $myurls = (isset($_REQUEST['urls'])?explode("\n", trim($_REQUEST['urls'])): array()); foreach ($myurls as $url) { // escapeshellcmd is for pussies and communists. $data = system("$foundCurl -I $url | grep -v '404'"); if ($data = "1") { echo "<font color='red'>404</font>: <a href='$url' target='_new'>[link]</a> $url<br>\n"; } } } } ?> </body> </html>
__________________
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#22 | |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
Quote:
That's in 2038, of course.
__________________
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#23 |
Confirmed User
Join Date: May 2005
Posts: 2,737
|
and some day JESUS WILL SAVE YOU. ZING!
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#24 | |
Confirmed User
Join Date: May 2005
Posts: 2,737
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#25 | |
rockin tha trailerpark
Industry Role:
Join Date: May 2001
Location: ~Coastal~
Posts: 23,088
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#26 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
Sure doesn't, but it can.. Just change the grep statement and remove the -I. That version was made as a (bigger) joke, though.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#27 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
Code:
<html> <head> <Title>404 Test Thingy or whatever</title> </head> <body bgcolor="#ffffff" text="#000000" link="#0000ff"> <br> <form method="post"> <div align="center"><strong>Test URLs:</strong><br> <textarea name="urls" id="urls" cols="45" rows="5"><?=isset($_REQUEST['urls'])?$_REQUEST['urls']:"";?></textarea> <br> <input type="submit" name="submit" id="submit" value="Check Response"> </div> </form> <?php // This is hardly an example of good PHP. Ugh. @require_once("class.curl.php"); // trim() to get rid of errant enter keys. $myurls = (isset($_REQUEST['urls'])?explode("\n", trim($_REQUEST['urls'])): array()); foreach ($myurls as $url) { // lame $search=""; $breakshit = @explode("|", $url); if (!empty($breakshit["1"])) { $url = $breakshit["0"]; $search = $breakshit["1"]; } // use our cURL class. $curlInit = new curl($url); // Make sure we don't follow redirects. $curlInit->setopt(CURLOPT_FOLLOWLOCATION, FALSE) ; $curlInit->setopt(CURLOPT_RETURNTRANSFER, TRUE) ; // Do it. $return = $curlInit->exec(); // If we returned a connection error, say so. if ($myError = $curlInit->hasError()) { echo "ERR: $url ($myError)<br>\n"; } else { // Reinit our array if (!eregi($search, $return)) { echo "<font color='red'>Did not find "".$search.""</font>: <a href='$url' target='_new'>[link]</a> $url<br>\n"; } } // We're done, close the socket. $curlInit->close(); } ?> </body> </html> Format: http://site.com/|searchterm If searchterm is empty, it doesn't fall back to 404. I don't feel like actually turning this pile of shit code into something worthwhile. I'm not bored anymore. ![]()
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#28 |
Retired
Industry Role:
Join Date: Dec 2002
Posts: 20,956
|
next time I think I'll just make a thread called, spam me with your PHP code...
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#29 |
rockin tha trailerpark
Industry Role:
Join Date: May 2001
Location: ~Coastal~
Posts: 23,088
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#30 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
|
i dont feel like reading through all this, but are we having another one of those contests to see who can do this more inefficiently again?
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#31 | |
Too lazy to set a custom title
Join Date: Dec 2006
Posts: 23,400
|
Quote:
![]() ![]() ![]()
__________________
i like waffles |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#32 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
That bitch Kris didn't play along so I gave up.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#33 |
Confirmed User
Join Date: May 2005
Posts: 2,737
|
sorry, I fell asleep haha
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#34 | |
Chafed.
Join Date: May 2002
Location: Face Down in Pussy
Posts: 18,041
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#35 |
MOBILE PORN: IMOBILEPORN
Join Date: Jan 2004
Location: Tinseltown NL
Posts: 16,502
|
damn shush grouchy i just did it in a 5 mins i was tired, it worked on my dev server
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#36 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
It's no fun playing in the kiddy pool. Bitch.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#37 |
Confirmed User
Join Date: May 2005
Posts: 2,737
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#38 |
Too lazy to set a custom title
Join Date: Jun 2004
Location: Brasil
Posts: 15,778
|
some interesting scripts around here...
__________________
Do you need cheap, fast and reliable porn website hosting? Host Head is the way to go!! Asian Gay Special | Live on MSN - Live Webcam Chat | Live Adult Webcam Performances | MY SWEET BLACKS LIVE ON CAM Pukka Tranny | Tattooed Shemales | She's A He | Menu Porno | Porn Performances | All Chubby MY ICQ# 169833797 |
![]() |
![]() ![]() ![]() ![]() ![]() |