get the referring url title and write to LP > HELP

sapo

Power Member
Joined
Feb 25, 2008
Messages
510
Reaction score
286
okay I am trying to get the title of the referring url ( I do not own this page ) and place it into my lp.

example they came from a site called "learn how to dance" and when they land on my site their a huge text "learn how to dance"



you know how you can do welcome "california resident" with those geoip scripts , I was wondering if you can do the same thing for the referring url title.


any help is always appreciated.
 
One way would be checking the ref. URL for the query string..
For example a search in google for "loose weight fast" and clicking on a link will give you this referer:
google /url?sa=t&rct=j&q=lose%20weight%20fast&.....

You could use the part from "q=" to the following "&" sign, the php for that would be:
$s = "googledotcom/url?sa=t&rct=j&q=lose%20weight%20fast&source=web&cd=6&sqi=2&ved=0CIcBEBYwBQ&url=http%3A%2F%2Fwww.loseweightfast.net.au%2F&ei=XZijT__gEsK1hAeUxpSwCA&usg=AFQjCNGZdhp_5h9ZpkgZmo8PTVRKcZJaDA";

$p1 = strpos($s, "q=");//position start
$qe = substr($s, $p1);//string from start position
$p2 = strpos($qe, "&");//position end


$query = substr($qe, 2, $p2-2);//cuts from start position +2 (q=) untill end position -2...
echo $query;

If this helped you Rep +1 and thanks are very appriciated ;)
 
One way would be checking the ref. URL for the query string..
For example a search in google for "loose weight fast" and clicking on a link will give you this referer:


You could use the part from "q=" to the following "&" sign, the php for that would be:


If this helped you Rep +1 and thanks are very appriciated ;)

no that wouldent work cause the referring url I will be using have no hint of the title. Its just a bunch of 3243j234jh324, but thanks.
 
Not sure if I follow. Could you try and elaborate your question? I think I understand some but I am not sure if I follow completely...
 
no that wouldent work cause the referring url I will be using have no hint of the title. Its just a bunch of 3243j234jh324, but thanks.

OK maybe this method...
If you've got the url from where your visitor comes, you can load the html as plain text via PHP (file_get_contents) and get contents of the "title" tag?

You could use the same code as before with a slight modification:
//file to load
$f = file_get_contents("http://www[dot]blackhatworld[dot]com/blackhat-seo/cloaking-content-generators/437470-get-referring-url-title-write-lp-help.html");

$p1 = strpos($f, "<title>");//position start
$qe = substr($f, $p1);//string from start position
$p2 = strpos($qe, "</title>");//position end


$query = substr($qe, 7, $p2-2);//cuts from start position +7 (<title>) untill end position -2...
echo $query;

You could also check the page's meta description and/or keywords using the same method ;)
 
Not sure if I follow. Could you try and elaborate your question? I think I understand some but I am not sure if I follow completely...

Im just trying to grab the title of the referring page .

for instance.

say my visitor is coming from this page. this page title is "get the referring url title and write to LP > HELP"

so when they land on my page I can personalize it for instance, I want my page to say - So you wan to learn about "enter referring url page title (and in our case it will be 'get the referring url title and write to LP > HELP')"

this way I dont have to create unique pages everytime a new visitor lands, so I can just have the same LP for everyone. thanks.

OK maybe this method...
If you've got the url from where your visitor comes, you can load the html as plain text via PHP (file_get_contents) and get contents of the "title" tag?

You could use the same code as before with a slight modification:


You could also check the page's meta description and/or keywords using the same method ;)

Hey bro I wouldent even know how to excute that. I tried just copy pasting into a a .php and running but didnt work.
 
Hey bro I wouldent even know how to excute that. I tried just copy pasting into a a .php and running but didnt work.

You kneed the code I gave you for what your trying to achieve.

It's pretty simple script actually, just copy this in a blank .php file and replace [dot] with "." in the variable $url_to_load, this is because I cant post any links in my comments. If you look closely, the url is the same as this post.. if you run the script correctly, it should print out just the title of this threat.


//url to load
$url_to_load = "http://www[dot]blackhatworld[dot]com/blackhat-seo/cloaking-content-generators/437470-get-referring-url-title-write-lp-help.html";

$f = file_get_contents($url_to_load);

$p1 = strpos($f, "<title>");//position start
$qe = substr($f, $p1);//string from start position
$p2 = strpos($qe, "</title>");//position end


$query = substr($qe, 7, $p2-2);//cuts from start position +7 (<title>) untill end position -2...
echo $query;

If you kneed any help PM me. Good luck!

Rep+ and thanks appreciated ;)
 
You kneed the code I gave you for what your trying to achieve.

It's pretty simple script actually, just copy this in a blank .php file and replace [dot] with "." in the variable $url_to_load, this is because I cant post any links in my comments. If you look closely, the url is the same as this post.. if you run the script correctly, it should print out just the title of this threat.



If you kneed any help PM me. Good luck!

Rep+ and thanks appreciated ;)

another thing I wont know the url, they visitor can be comming from numerous place that I dont even know.
 
OK, next thing you can try when you don't get a referer URL is, you could check for cookies.

For example, if you search on Google "searchkeyword" and click on a link, G stores your search in a cookie in this format:
__utma=248............................|utmcmd=organic|utmctr=searchkeyword

Now you could extract the "utmctr" parameter which is "searchkeyword"


If this still doesn't solve your problem, I can't help you more bro cuz you know time is money.
So you should probably hire a programmer and see if he can help you achieve your goal.

Best of luck,
B4br
 
the thing is the script you gave me only works for the specifying url we specify in the script.

I want it to grab the referring url by itself and parsing the title.


If I knew what site they were coming from Ill just manually add the title myself with no script. why would I go thry the trouble but it cool, I'll figure it out thanks for your help up to here.
 
the thing is the script you gave me only works for the specifying url we specify in the script.


I want it to grab the referring url by itself and parsing the title.




If I knew what site they were coming from Ill just manually add the title myself with no script. why would I go thry the trouble but it cool, I'll figure it out thanks for your help up to here.


My code only is part (the important part), of the script your gonna need to accomplish this.
I can't post you the complete code since I normally would get paid to do this you know..


The method I have given you is completely automated, no manual work needed. And trust me, automated is Almost always better than manual for these things...


For example you could do:
if(isset($_SERVER['HTTP_REFERER'])) {
$url_to_load = $_SERVER['HTTP_REFERER'];


$f = file_get_contents($url_to_load);
//.... the same code as above
}


Good luck
 
My code only is part (the important part), of the script your gonna need to accomplish this.
I can't post you the complete code since I normally would get paid to do this you know..


The method I have given you is completely automated, no manual work needed. And trust me, automated is Almost always better than manual for these things...


For example you could do:



Good luck

I already done that by my own reasearh and it just return errors. Ill pm you see if we cant work out a deal.
 
Bro you got your PM box full...

I PM-ed you like an hour ago.. but I think you didn't receive it... so here we go again:

I can to do this job for you but first I need to see your page/code.
I'll do it in exchange for something else, not money necessarily, what can you offer me? design, blasts, domain names...
 
Back
Top