Hi Rocky
I'll ask my programmer in the morning when he comes in and drop you a pm ..
should be something he can do on it.. he likes a challenge![]()
I need help with come coding for parked domains, but can't find anyone who has a clue how to do what we want.
I have several hundred parked generic domain names, they are all pointing to one holding page using Apache ServerAlias in httpd.conf (much quicker than setting up a site for each).
I want to put those names to better use by showing results from Mirago (or Google?) that are linked to the generic word in the domain name.
I have found a CGI script from Mirago that can produce affiliate based search results based on a generic word query (i.e. if you type in ww.mysite.com/cgi/miragoscript.pl?query=food it will produce an entire page of food linked results).
So far so good, but we haven't been able to work out how to grab the domain name, strip out the "www" and the ".com" bit to be left with just the generic word, and then add that as a query to fire the Mirago CGI script and produce the search results page.
If you can do this, you probably think it's easy. If you can't, you probably stopped reading several minutes ago....
If you know how to do this and can show proof of concept, please pm me as you may have a job waiting.
Ta,
Larry.
Sell your domain names without commission! www.nameseller.co.uk/
Hi Rocky
I'll ask my programmer in the morning when he comes in and drop you a pm ..
should be something he can do on it.. he likes a challenge![]()
if the page is php then a combiantion of PHP_SELF to grab the full url of the page combined with substr & strpos should allow you to extract the main part of the domain name
Here is one solution for PHP:
I have PM'd this to you as well but thought I would post it here for others to use.PHP Code:<?php
//get server name
$name = $_SERVER['SERVER_NAME'];
//strip out the pieces either side of the full stops into an array
$pieces = explode(".", $name);
//concat the first part with the name in it to the end of the URL and place in a variable
$link = "http://www.mysite.com/cgi/miragoscript.pl?query=". $pieces[0];
//auto redirect server side to the new url with query
header("Location: $link");
?>
Last edited by shopguru; 02-11-05 at 10:32 PM.
The Guru
===========================
Just stop moanin' and get on with it!
===========================
http://www.shopguru.co.uk
Thanks for your help so far, but I must be the only server operator not using PHP on planet Earth.
It could have something to do with the amount of stories like this one I have seen recently....
http://www.theregister.co.uk/2005/11...security_vuln/
Has anyone got a non PHP hack?
Sell your domain names without commission! www.nameseller.co.uk/
So do you have ASP?
Im pretty sure theres an ASP version of shopguru's approach
If you're that paranoid I hope you're not using WindowsRocky - It could have something to do with the amount of stories like this one I have seen recently....
http://www.theregister.co.uk/2005/11...security_vuln/![]()
Okay you can do this in a .htaccess file:
#Turn on mod_rewrite
RewriteEngine on
#Grab the server name
%{SERVER_NAME}$ (need to perform regular expression here to lose .com or .co.uk)
Then use RewriteRule to redirect to http://www.mysite.com/cgi/miragoscript.pl?query={SERVER_NAME}
This isn't the full code as I don't know it off the top of my head but it should point you in the right direction. Good Luck.
The Guru
===========================
Just stop moanin' and get on with it!
===========================
http://www.shopguru.co.uk
Can someone point me to a PHP script for mirago so I can use Mirago searches as a backfill on my site.
Purple, in the Mirago login, they have there own scripts you can use somewhere,Originally Posted by purple
I will look later can someone explain in lame man terms how I get the backfill to work using php code ( Last time I looked, it did not seem easy on the mirago site)Originally Posted by Ste
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks