Results 1 to 2 of 2

Thread: Any Php Gurus Around? Quick Coding Question..

  1. #1
    You do realize by 'gay' I mean a man who has sex with other men?
    Join Date
    Oct 2003
    Location
    New Orleans, Louisiana.
    Posts
    21,635

    Any Php Gurus Around? Quick Coding Question..

    We have the following code which will fetch the referring url of a specific page and search it for specific keywords and then redirect that url to another URL of our choice [in this instance the FBIs website].

    PHP Code:
    <? 

    // Redirect "Lolita" traffic 

    $refer_full_path "$HTTP_REFERER"."$PATH_INFO"

    if(( 
    preg_match("/lolita/i"$refer_full_path)) || 
    preg_match("/child/i"$refer_full_path)) || 
    preg_match("/preteen/i"$refer_full_path)) || 
    preg_match("/pre-teen/i"$refer_full_path)) || 
    preg_match("/****/i"$refer_full_path)) || 
    preg_match("/underage/i"$refer_full_path)) || 
    preg_match("/beast/i"$refer_full_path)) || 
    preg_match("/rape/i"$refer_full_path)) || 
    preg_match("/kinder/i"$refer_full_path)) || 
    preg_match("/incest/i"$refer_full_path)) || 
    preg_match("/kiddie/i"$refer_full_path))) {


    header
    ("Location: $refer_full_path"); 
    exit;



    ?> 

    <? 
    $words
    =array("childporn","underage","beast","interracial","lolita","preteen"); 
    for(
    $i=0;$i<count($words);$i++){ 
    if(
    eregi($words[$i],$HTTP_REFERER)){ 
    header("Location: <a href="http://www.fbi.gov/?CHILD_PORN_ON_DISK_LOGGED_AND_REPORTED" target="_blank">[url]http://www.fbi.gov/?CHILD_PORN_ON_D...ED_AND_REPORTED[/url]</a>"); 


    ?>
    Now my question is this..

    How would i alter or add to that coding so that when a 'hit' on one of the selected keywords happens, the meta tags on the page that they have linked to get changed to include the same word in our meta tags dynamically? Obviously we wont be using CP related words such as are included in the above example but for instance, if the ip address 123.456.789.010 hits our site [mydomain.com] from someone elses site [theirdomain.com] the meta keywords from theirdomain.com appears in the meta tags on mydomain.com?

    Hope that makes sense LOL

    Regards,

    Lee


  2. #2
    JustMe
    Guest
    Greetings:

    Ok, this isn't going to be practical for you to do Lee. :hmmph:

    Meta-tags of the referring url aren't something that's passed on as a variable to your server by the client. So:

    The only way for your domain [mydomain.com] to know what the meta-tags are on the referring domain [theirdomain.com], would be for your site to literally go out and spider the referring domain, filter out the meta-tags, insert them into a variable, then pass that variable along to the page that generates the html for the client.

    The time this would take would put way too long of a delay on page load for the end user, and it would put way too high of a per-request overhead on your processor, which would slow things down even further.

    So, while possible, doing something like this isn't at all practical.

    Good idea though....


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •