Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

php header

Status
Not open for further replies.

zura

Technical User
Sep 20, 2011
23
GE
How can i send $e on this url: Header(); does not works. (Cannot modify header information - headers already sent by (output started at /home/...))
Code:
<?php
ob_start();
$nomeri = $_POST['operator'].$_POST['cellular'];
$messageText = $_POST['message'];
$e = "?login=zzz&psw=zzz&phones=".$nomeri."&mes=".$messageText;
ob_end_flush();
?>

Thanks for help.
 
The header call must be done before any output is sent out.
If that's all there is in the page, placing the header call before the ob_end_flush() should make it work.




----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
I solved this problem myself ...here script...

Code:
<?php
$nomeri = $_POST['operator'].$_POST['cellular'];
$messageText = $_POST['message'];
$data = "?login=zura&psw=zzz&phones=".$nomeri."&mes=".$messageText;
$ch = curl_init(); 
 curl_setopt($ch, CURLOPT_URL, "[URL unfurl="true"]http://smsc.ru/sys/send.php".$data);[/URL]
 curl_setopt($ch, CURLOPT_POST, 1);
 curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 
$res = curl_exec($ch);
?>
 
double post with thread434-1665896

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top