Jump to content


Photo

Help me : How to send variable ??


  • Please log in to reply
2 replies to this topic

#1 roby2411

roby2411
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 15 September 2006 - 12:13 PM

I have a variable like that

$msg = " <html><body><center>Hello</center></body></html> ";

I do need a function that send this variable " $msg " to a URL http://192.168.1.1:5050 without using form or sumbit form i need it automatically

#2 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 15 September 2006 - 12:17 PM

You can just echo it...

index.php
<?php
$msg = "<html><body><center>Hello</center></body></html>";
echo $msg;
?>

Huggie
Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools

#3 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 15 September 2006 - 12:45 PM

the only way to send a variable apart from a form when you're going across servers like that is to try something like fsockopen(). another option would be to send it via the URL (with a $_GET), but you'd still have to have a link or redirect set up with that variable in the path. also, your receiving script would have to know exactly what variable was being sent.

can you give more detail on the problem? if you can be more specific on what you're after, i'm sure we can help you come up with a better solution
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users