RE: [PHP] Problem with the HTTP_REFERER

2001-04-27 Thread Simon Ould

My interpretation of the problem is:
You want a link on page A.php which points to B.php, 
B.php does some stuff, then redirects the user to page C.php

You want the value of HTTP_REFERER on page C.php to be A.php

Correct? If so, read on, if not, then delete this email.

I'm using php-4.0.4pl1, apache 1.3.14, IE5.5, win2000, and this works on my
system.

My two solutions both use the following 2 files :
[index.html]
HTML
HEAD
TITLETest/TITLE
/HEAD
BODY
A HREF=test.php target=_blankClick here/A
/BODY
/HTML

[targetpage.php]
HTML
HEAD
TITLEtargetpage.php/TITLE
/HEAD
BODY
You came to this page from ?php echo $HTTP_REFERER;?
/BODY
/HTML


Solution 1:
Use the php function header
(http://www.php.net/manual/en/function.header.php)

[test.php]
?php
//... do stuff
$web= http://localhost/referer_test/targetpage.php;;
header (Location: .$web);
?

---
Solution 2:
Pass HTTP_REFERER in the URL: This also works on my system, but isn't
exactly the neatest of methods.

[test.php]
HTML
HEAD
TITLEtest.php/TITLE
/HEAD
BODY
?php
$web= localhost/referer_test/targetpage.php;
$web= $web.?HTTP_REFERER=.$HTTP_REFERER;  //pass HTTP_REFERER
in the URL
echo SCRIPT
language=\javascript\window.location.href=\http://$web\;/script;
?
/BODY
/HTML




Hope that helped,

Simon.

 -Original Message-
 From: Rosen [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 27, 2001 07:56
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Problem with the HTTP_REFERER
 
 
 Is anybody knows how can I redirect to another page
 and the REFERER to another page to be my page ?
 
 Thanks,
 Rosen Marinov
... snip ...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Problem with the HTTP_REFERER

2001-04-27 Thread Simon Ould

I guess that this is worth a mention: (Copied from
http://www.php.net/manual/en/function.header.php)
Remember that the header() function must be called before any actual output
is sent, either by normal HTML tags blank lines in a file, or from PHP. It
is a very common error to read code with include(), or require(), functions,
or another file access function, and have spaces or empty lines that will
output before header() is called. The same problem exists when using a
single PHP/HTML file. 


 -Original Message-
 From: Simon Ould [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 27, 2001 11:12
 To: 'Rosen'; [EMAIL PROTECTED]
 Subject: RE: [PHP] Problem with the HTTP_REFERER

...snip...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP Book?

2001-04-27 Thread Simon Ould

PHP Developers Cookbook, by Sterling Hughes
I like it: as the name might suggest, it is packed with real-World examples.

I also bought Beginning PHP Programming (Wrox press). Mistake. Big
mistake. It is aimed at people who are *completely* new to programming. The
review that I read of it didn't convey this aspect :(

For example, in chapter 5 or 6 there is a paragraph along the lines of:
You know that we told you to make your code reusable? Here's why: you can
use something called a function... 
I actually found it vaguely funny, whilst I was banging my head against the
wall.

 -Original Message-
 From: Hamed Nik [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 27, 2001 14:10
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP Book?
 
 
 Hey everyone...
 
 I've been programming in perl for about 3 years now, i have 
 installed php
 and have been working on it for about three weeks. I started 
 by converting
 some of the programs I've written in Perl to PHP it seems 
 its pretty
 similar to Perl and not very hard to learn for a perl 
 programmer... but i
 need some reference book with some practical examples so i could work
 with... and probably something that gives me ideas on 
 different types of
 programs and things that i could do in PHP... something that covers
 everything in PHP... and is NOT copied from the manual! :))
 
 I am sure most of you in this group have got some sort of a 
 PHP book... can
 you please tell me out of your experience which ones are good 
 for me to buy?
 
 Regards
 Hamed Nik
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: 
 [EMAIL PROTECTED]
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] sending SMS messages via PHP

2001-03-09 Thread Simon Ould

Have you tried www.deltica.com ?

I haven't used them myself but am planning to in the near future - as soon
as I get the site finished.
You buy messages in blocks:
100 msgs 8.00 
1,000 msgs 70.00 
10,000 msgs 500.00 

They also have a trial service where you get 4 free messages.
You don't appear to be able to receive text messages.

Regards

Simon.

 -Original Message-
 From: Greig, Euan [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 09, 2001 09:24
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: [PHP] RE: sending SMS messages via PHP
 
 
  We send SMS messages from Oracle, but the method could be 
 used in php I
 think. We use www.quios.com. They accept SMS messages as XML documents
 which you simply post to their site using http. The response, 
 also by http,
 is an xml document. It is very easy to build your outgoing 
 xml document,
 and the response document is so simple in structure that you 
 could probably
 get by without an xml parser to interpret it.
 
 
 Does it cost anything?
 Do you need to be registered?
 
 Are there similar services?
 
 Apologies for imprecise answers, the facility was arranged 
 for us by another department in our company.
 
 Yes it does cost, but I don' t know how much. You do have to 
 register. I suggest you visit the site for further info. I 
 don't specifically know of any similar sites, but they must exist.
 
 Euan Greig
 Technical Consultant
 BRANN DATA
 [EMAIL PROTECTED]
 01285 645997
 
 
 
 
 
 **
 
 Any opinions expressed in this email are those of the individual and 
 not necessarily the Company. This email and any files 
 transmitted with 
 it, including replies and forwarded copies (which may contain 
 alterations) 
 subsequently transmitted from the Company, are confidential 
 and solely for 
 the use of the intended recipient. If you are not the 
 intended recipient 
 or the person responsible for delivering to the intended 
 recipient, be 
 advised that you have received this email in error and that 
 any use is 
 strictly prohibited.
 
 **
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: 
 [EMAIL PROTECTED]
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]