Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | Sphere 3d desktop beta

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > General IT Discussion
Register FAQ Community Calendar

Php stuff
Reply
 
Thread Tools
Old 06-04-2005, 09:48   #1
Mr_love_monkey
Inactive
 
Mr_love_monkey's Avatar
 
Join Date: Jun 2003
Location: London way
Age: 50
Services: Sarcasm
Posts: 8,376
Mr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny stars
Mr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny stars
Php stuff

ok, what I'm looking to do is from one website, during a process, make a call to another website address, passing along x amount of information, but without physically redirecting from the current page.

Obviously the recieving page can just pull the data out of the url, but how does the calling page make the request, without doing a literal forward?

(if any of that makes sense).
Mr_love_monkey is offline   Reply With Quote
Advertisement
Old 06-04-2005, 10:01   #2
punky
Inactive
 
Join Date: Jun 2003
Age: 45
Posts: 14,750
punky has a golden aurapunky has a golden aura
punky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aura
Re: Php stuff

Quote:
Originally Posted by Mr_love_monkey
ok, what I'm looking to do is from one website, during a process, make a call to another website address, passing along x amount of information, but without physically redirecting from the current page.

Obviously the recieving page can just pull the data out of the url, but how does the calling page make the request, without doing a literal forward?

(if any of that makes sense).
Well, you can do a HTTP POST.

You'd set up a form, with a POST action, and a submit button. You would leave your inital page, so you'd have to redirect back.

For example you would do something like

initalpage.htm
Code:
<form action="secondpage.php" method="post">
<input type="text" anme="name" size="20">
<input type="submit" value="Submit Form">
</form>
and in secondpage.htm
PHP Code:
echo $_POST['name']; 
You could use javascript and open a link in another window, but popup blockers will probably block it:

Code:
window.open('secondpage.php?name=punky','newwindow');
And you would GET instead of POST to get the name like:

PHP Code:
echo $_GET['name']; 
HTH
punky is offline   Reply With Quote
Old 06-04-2005, 10:04   #3
Mr_love_monkey
Inactive
 
Mr_love_monkey's Avatar
 
Join Date: Jun 2003
Location: London way
Age: 50
Services: Sarcasm
Posts: 8,376
Mr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny stars
Mr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny stars
Re: Php stuff

No, it needs to be invisible - I need to make the call without disrupting the flow from the current page.

I could do it easily in java... grumble grumble...
Mr_love_monkey is offline   Reply With Quote
Old 06-04-2005, 10:07   #4
punky
Inactive
 
Join Date: Jun 2003
Age: 45
Posts: 14,750
punky has a golden aurapunky has a golden aura
punky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aura
Re: Php stuff

Quote:
Originally Posted by Mr_love_monkey
No, it needs to be invisible - I need to make the call without disrupting the flow from the current page.

I could do it easily in java... grumble grumble...
If you are feeling brave, you can use PHP sockets.
punky is offline   Reply With Quote
Old 06-04-2005, 10:47   #5
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Re: Php stuff

Quote:
Originally Posted by Mr_love_monkey
No, it needs to be invisible - I need to make the call without disrupting the flow from the current page.

I could do it easily in java... grumble grumble...
PHP Code:
<?php include_once("http://www.example.com/somefile.php?variable=attribute");
?>
Richard M is offline   Reply With Quote
Old 06-04-2005, 10:48   #6
philip.j.fry
Inactive
 
philip.j.fry's Avatar
 
Join Date: Jul 2003
Posts: 1,395
philip.j.fry has reached the bronze age
philip.j.fry has reached the bronze agephilip.j.fry has reached the bronze agephilip.j.fry has reached the bronze agephilip.j.fry has reached the bronze age
Re: Php stuff

Quote:
Originally Posted by Mr_love_monkey
I could do it easily in java... grumble grumble...
As far as I can see, you can do it in a similar way as you can in Java, you just open a remote file and read it in, then do what you want with the data.

http://www.scit.wlv.ac.uk/appdocs/ph...ote-files.html

Quote:
Originally Posted by punky
If you are feeling brave, you can use PHP sockets.
Bit of an overkill for Mr LM but just what I was looking for
philip.j.fry is offline   Reply With Quote
Old 06-04-2005, 11:37   #7
Mr_love_monkey
Inactive
 
Mr_love_monkey's Avatar
 
Join Date: Jun 2003
Location: London way
Age: 50
Services: Sarcasm
Posts: 8,376
Mr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny stars
Mr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny starsMr_love_monkey has a pair of shiny stars
Re: Php stuff

Quote:
Originally Posted by Richard M
PHP Code:
<?php include_once("http://www.example.com/somefile.php?variable=attribute");
?>
Excellent!
Mr_love_monkey is offline   Reply With Quote
Old 06-04-2005, 12:31   #8
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Re: Php stuff

Quote:
Originally Posted by Mr_love_monkey
Quote:
Originally Posted by Richard M
PHP Code:
<?php include_once("http://www.example.com/somefile.php?variable=attribute");
?>
Excellent!
Remember to leave it in double quotes so the string is evaluated.
This would not work:

PHP Code:
<?php include_once('http://www.example.com/somefile.php?variable=$value'); ?>
But this would:

PHP Code:
<?php include_once("http://www.example.com/somefile.php?variable=$value");
?>
Richard M is offline   Reply With Quote
Old 06-04-2005, 12:36   #9
punky
Inactive
 
Join Date: Jun 2003
Age: 45
Posts: 14,750
punky has a golden aurapunky has a golden aura
punky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aura
Re: Php stuff

Oh yeah, the includes... How the hell did I miss that...?
punky is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 15:56.


Server: lithium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum