php-general Digest 26 Sep 2011 00:08:05 -0000 Issue 7493

2011-09-25 Thread php-general-digest-help

php-general Digest 26 Sep 2011 00:08:05 - Issue 7493

Topics (messages 315021 through 315025):

Re: PHP redirect
315021 by: Dajka Tamas
315022 by: muad shibani
315023 by: Dajka Tamas
315024 by: muad shibani

New Service - Short URL Unshortener
315025 by: Mike Mackintosh

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---
If $data['feed_link'] is extracted from $_POST, then it's already
urldecoded.

BTW, what's the problem? It's not redirecting you, or just redirecting you
to az unavailable/wrong page? ( most browsers change the  amp; in titlebar
to '', so you don't have to worry about that )

-Original Message-
From: muad shibani [mailto:muad.shib...@gmail.com] 
Sent: Saturday, September 24, 2011 12:36 PM
To: php-gene...@lists.php.net
Subject: [PHP] PHP redirect

when I try to go to a URL by using PHP header function so if the URL
contains  it converts it to amp; so the needed page will not
display correctly I tried to use:

 $url = urldecode($data['feed_link']);

 header ( Location: $url );

but I can't get it

---End Message---
---BeginMessage---
it redirecting me to  unavailable/wrong page, the data came from database
but each time it gives me amp; instead of 

On Sat, Sep 24, 2011 at 3:39 AM, Dajka Tamas vi...@vipernet.hu wrote:

 If $data['feed_link'] is extracted from $_POST, then it's already
 urldecoded.

 BTW, what's the problem? It's not redirecting you, or just redirecting you
 to az unavailable/wrong page? ( most browsers change the  amp; in titlebar
 to '', so you don't have to worry about that )

 -Original Message-
 From: muad shibani [mailto:muad.shib...@gmail.com]
 Sent: Saturday, September 24, 2011 12:36 PM
 To: php-gene...@lists.php.net
 Subject: [PHP] PHP redirect

 when I try to go to a URL by using PHP header function so if the URL
 contains  it converts it to amp; so the needed page will not
 display correctly I tried to use:

  $url = urldecode($data['feed_link']);

  header ( Location: $url );

 but I can't get it


---End Message---
---BeginMessage---
Try header(Location: .html_entity_decode($data['feed_link']));

 

From: muad shibani [mailto:muad.shib...@gmail.com] 
Sent: Saturday, September 24, 2011 12:41 PM
To: Dajka Tamas
Cc: php-gene...@lists.php.net
Subject: Re: [PHP] PHP redirect

 

it redirecting me to  unavailable/wrong page, the data came from database
but each time it gives me amp; instead of 

On Sat, Sep 24, 2011 at 3:39 AM, Dajka Tamas vi...@vipernet.hu wrote:

If $data['feed_link'] is extracted from $_POST, then it's already
urldecoded.

BTW, what's the problem? It's not redirecting you, or just redirecting you
to az unavailable/wrong page? ( most browsers change the  amp; in titlebar
to '', so you don't have to worry about that )


-Original Message-
From: muad shibani [mailto:muad.shib...@gmail.com]
Sent: Saturday, September 24, 2011 12:36 PM
To: php-gene...@lists.php.net
Subject: [PHP] PHP redirect

when I try to go to a URL by using PHP header function so if the URL
contains  it converts it to amp; so the needed page will not
display correctly I tried to use:

 $url = urldecode($data['feed_link']);

 header ( Location: $url );

but I can't get it

 

---End Message---
---BeginMessage---
it works very well .. thanks a lot for you dajkta you saved my day .. thanks
a lot

On Sat, Sep 24, 2011 at 3:45 AM, Dajka Tamas vi...@vipernet.hu wrote:

 Try header(”Location: ”.html_entity_decode($data[’feed_link’]));

 ** **

 *From:* muad shibani [mailto:muad.shib...@gmail.com]
 *Sent:* Saturday, September 24, 2011 12:41 PM
 *To:* Dajka Tamas
 *Cc:* php-gene...@lists.php.net
 *Subject:* Re: [PHP] PHP redirect

 ** **

 it redirecting me to  unavailable/wrong page, the data came from database
 but each time it gives me amp; instead of 

 On Sat, Sep 24, 2011 at 3:39 AM, Dajka Tamas vi...@vipernet.hu wrote:***
 *

 If $data['feed_link'] is extracted from $_POST, then it's already
 urldecoded.

 BTW, what's the problem? It's not redirecting you, or just redirecting you
 to az unavailable/wrong page? ( most browsers change the  amp; in titlebar
 to '', so you don't have to worry about that )


 -Original Message-
 From: muad shibani [mailto:muad.shib...@gmail.com]
 Sent: Saturday, September 24, 2011 12:36 PM
 To: php-gene...@lists.php.net
 Subject: [PHP] PHP redirect

 when I try to go to a URL by using PHP header function so if the URL
 contains  it converts it to amp; so the needed page will not
 display correctly I tried to use:

  $url = urldecode($data['feed_link']);

  header ( Location: $url );

 but I can't get it

 ** **

---End Message---
---BeginMessage---
Hey All,

Wanted 

[PHP] New Service - Short URL Unshortener

2011-09-25 Thread Mike Mackintosh
Hey All,

Wanted to pass a kind word of a new service we launched called Unshortenr 
(www.unshortenr.com) - which was linkrater.com. 

Input a short url and you'll get the target address, the page title, and a 
description of the page. 

Soon to add an option to preview it with a images on/off type of deal.

Feedback would be appreciated.

Thanks,

Mike
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP operate file(fseek)

2011-09-25 Thread yzang
Hey All,

I want to seek file pointer to some line in a huge file with fseek().
I know that can use fgets() to locate, but this line is uncertain, for example 
end of the file or in the middle of the file.
Use fgets () loop to read may not be high efficiency.
I need your help.Thanks.
2011-09-26 



yzang