[web] How to call a link without redirecting a page
ok this post is acting all funny
-Mayple[/font]
$site = site; // enter the URL for the site http:// included
function bitlyURL($url) {
$headers = get_headers($url, 1);
return $headers['Location'];
}
echo bitlyURL($site);
[font="Arial"]-Mayple[/font]
how is it acting funny?
what is the code ^^ doing?
I actually found a way to get the link..but the problem is the XMLHttpRequest
I think it overwrites previous data
for example if i have 2 bitly links only one gets called..the other isn't expanded :S
what is the code ^^ doing?
I actually found a way to get the link..but the problem is the XMLHttpRequest
I think it overwrites previous data
for example if i have 2 bitly links only one gets called..the other isn't expanded :S
I did it! Thanks a lot dude and others who replied.
Awesome job. Did you just assign a basic array for the values coming from the xHTTP?
-Mayple
sorry for the late reply..I never get any notifications.
Yeah, I made an async call using xmlhttp to a php file which used the bitly api to expand the link.
then I jsonified lol to a javascript and echoed it.
The callback function in javascript gets called in a json array format..
But it was your bitly api idea that got me started thanks a lot
Yeah, I made an async call using xmlhttp to a php file which used the bitly api to expand the link.
then I jsonified lol to a javascript and echoed it.
The callback function in javascript gets called in a json array format..
But it was your bitly api idea that got me started thanks a lot
sorry for the late reply..I never get any notifications.
Yeah, I made an async call using xmlhttp to a php file which used the bitly api to expand the link.
then I jsonified lol to a javascript and echoed it.
The callback function in javascript gets called in a json array format..
But it was your bitly api idea that got me started thanks a lot
Not a problem :-).
-Mayple
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement