On Fri, Feb 4, 2011 at 12:15 PM, Jochen Daum <[email protected]> wrote:

> Hi,
>
>
> On 4 February 2011 11:32, Bruce Clement <[email protected]> wrote:
> [...]
> > 2 Retrieve the page,
>
> do you really need this page?
>
>
Not as such, all I really want is the final URL. I don't even want the page
contents (except to make sure it isn't itself a redirection).

My application is I run a php shell script every night to create a blog
entry on http://bruceclement.blogspot.com/ that is a permanent record of all
my twitter tweets of the day.

I'm about to rewrite this puppy using Twitter & Blogspot APIs as it's
grabbing my tweets via an RSS feed and posting via email and neither of
these are ideal ... the RSS truncates at 20 entries as well as chopping off
the end of long (for twitter) tweets while email delivery through Slingshot
has become extremely unreliable recently.

It's occurred to me that I should expand short URLs at the same time to
avoid the problem of the URL shortening service going out of business
leaving me with a large number of broken links.


> if not, you can just use curl_setopt($ch, CURLOPT_FOLLOWLOCATION,true);
>
> [...]
> <http://www.php.net/manual/en/function.curl-setopt.php>
>

Thanks for this, I'll give it a try.

Regards

Bruce
-- 
Bruce Clement

Home:    http://www.clement.co.nz/
Twitter:    http://twitter.com/Bruce_Clement
Google Buzz: http://www.google.com/profiles/aotearoanz

"Before attempting to create something new, it is vital to have a good
appreciation of everything that already exists in this field." Mikhail
Kalashnikov

-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to