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.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 05-26-2003, 04:45 PM   #1
pantymaniac
Confirmed User
 
Join Date: Feb 2003
Location: In Your GF's Panty.
Posts: 1,192
For -Php Guru's- Only

someone on anotner board wrote this php script to check if someone cheat galleries by language of browser
so how to modify that to check multiple (100) galleries same time ?

PHP:--------------------------------------------------------------------------------
<?php
if ($_GET["url"]) {
$lang = array("da","nl","es","de","en","fr","ko","zh");
echo "<font size=4><b>Testing $_GET[url] ..........</b></font><br><br>\n\n";
foreach ($lang as $l) {
echo "<b>Testing url with Accept-Language \"$l\":</b><br>\n";
echo hit_it($_GET["url"],$l);
}
}

function hit_it($url, $lang) {
$parsed = parse_url($url);
$fp = fsockopen ($parsed["host"], 80, $errno, $errstr, 5);
if (!$fp) { $return = "$errstr ($errno)"; }
else {
fputs ($fp, "HEAD $parsed[path] HTTP/1.0\r\nHost: $parsed[host]\r\nAccept-Language: $lang\r\nUser-Agent: Mozilla/4.0\r\n\r\n");
while(!feof($fp)) { $return .= fgets ($fp,128) . "<br>\n"; }
return $return;
fclose ($fp);
}
}
?>
__________________
This place is for RENT
pantymaniac is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-26-2003, 04:55 PM   #2
Libertine
sex dwarf
 
Libertine's Avatar
 
Join Date: May 2002
Posts: 17,860
I could do that in a few secs, but since you only want Guru's helping out, I guess you're screwed.
__________________
/(bb|[^b]{2})/
Libertine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-26-2003, 05:05 PM   #3
pantymaniac
Confirmed User
 
Join Date: Feb 2003
Location: In Your GF's Panty.
Posts: 1,192
__________________
This place is for RENT
pantymaniac is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-26-2003, 05:13 PM   #4
Nysus
Confirmed User
 
Industry Role:
Join Date: Aug 2001
Posts: 7,817
Just put a foreach that goes through an array of URLs, around the other foreach.

Cheers,
Matt
Nysus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-26-2003, 05:27 PM   #5
Libertine
sex dwarf
 
Libertine's Avatar
 
Join Date: May 2002
Posts: 17,860
Quote:
Originally posted by Nysus
Just put a foreach that goes through an array of URLs, around the other foreach.

Cheers,
Matt
Ofcourse, the script will probably time out with normal settings, so something should be done to prevent that from happening.
__________________
/(bb|[^b]{2})/
Libertine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-26-2003, 05:31 PM   #6
Icy
Confirmed User
 
Icy's Avatar
 
Industry Role:
Join Date: Mar 2002
Location: Spain
Posts: 864
Put the url's on a mysql database or an array and set a bucle to go throught the whole amount of url's. Asign each result to the url variable and check it for each language. Easy to code but it will take some time to you to add the 100 url's to te database or array unless you already have them added.
I only see the utility of this into an already codded tgp software, to check each galery when submitted as it checks for banned words etc, but not as standalone script.
Icy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-26-2003, 05:51 PM   #7
Libertine
sex dwarf
 
Libertine's Avatar
 
Join Date: May 2002
Posts: 17,860
Quote:
Originally posted by Icy
Easy to code but it will take some time to you to add the 100 url's to te database or array unless you already have them added.
He probably has the urls somewhere (txt file, html file, whatever), so getting them into an array (or database, if you prefer that) is a matter of some very simple code. Why type them in yourself when computers are so much better at stuff like that?
__________________
/(bb|[^b]{2})/
Libertine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-26-2003, 06:03 PM   #8
Icy
Confirmed User
 
Icy's Avatar
 
Industry Role:
Join Date: Mar 2002
Location: Spain
Posts: 864
Quote:
Originally posted by punkworld


He probably has the urls somewhere (txt file, html file, whatever), so getting them into an array (or database, if you prefer that) is a matter of some very simple code. Why type them in yourself when computers are so much better at stuff like that?
That's why i said "unless you already have them added" ;)
Icy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-26-2003, 06:05 PM   #9
Libertine
sex dwarf
 
Libertine's Avatar
 
Join Date: May 2002
Posts: 17,860
Quote:
Originally posted by Icy


That's why i said "unless you already have them added" ;)
Well, not many other options, assuming he doesn't know them by heart
__________________
/(bb|[^b]{2})/
Libertine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.