do i have to have curl installed?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
chopficaro
Forum Commoner
Posts: 68
Joined: Fri Jan 01, 2010 12:56 am

do i have to have curl installed?

Post by chopficaro »

i am trying to make a redirect post request in php
i dont have direct access to the server, so i cant install things
this is such a simple thing, isnt there a way to do this without curl or httprequest extensions installed?
Eric!
DevNet Resident
Posts: 1146
Joined: Sun Jun 14, 2009 3:13 pm

Re: do i have to have curl installed?

Post by Eric! »

What is a redirect post request? Posting and redirecting are different things. Are you just trying to redirect the browser to another URL?

header("Location: http://domain.com/newurl.html");
chopficaro
Forum Commoner
Posts: 68
Joined: Fri Jan 01, 2010 12:56 am

Re: do i have to have curl installed?

Post by chopficaro »

when the user clicks on a button i want php to make a decision based on variables and then visit a link with post variables
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: do i have to have curl installed?

Post by califdon »

chopficaro wrote:when the user clicks on a button i want php to make a decision based on variables and then visit a link with post variables
You do realize that by the time the user can see a web page, PHP is no longer in the picture; it is a server side language, is interpreted by the web server before anything is sent to the browser and there is no PHP code remaining. A user's actions can only be detected by a client side language, such as Javascript.
chopficaro
Forum Commoner
Posts: 68
Joined: Fri Jan 01, 2010 12:56 am

Re: do i have to have curl installed?

Post by chopficaro »

wtf i am so stupid
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: do i have to have curl installed?

Post by califdon »

Nah, it's a common mistake. You get focussed on something and miss the obvious.
Post Reply