Submit Your Article Forum Rules

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: PHP Problem

  1. #1

    PHP Problem

    Is possible to post values directly to a webpage, but without using a submit button, i.e. directly from the server and no human interaction.

    Cheers

    Andrew

  2. #2
    WebProWorld MVP DaveSawers is a splendid one to behold DaveSawers is a splendid one to behold DaveSawers is a splendid one to behold DaveSawers is a splendid one to behold DaveSawers is a splendid one to behold DaveSawers is a splendid one to behold DaveSawers is a splendid one to behold DaveSawers's Avatar
    Join Date
    Dec 2006
    Location
    Lunenburg, Nova Scotia, Canada
    Posts
    690

    Re: PHP Problem

    What does that mean exactly?

    Are you asking if you can use the POST protocol to pass data to a web page?

    If so, what would you use that for that you couldn't do directly using PHP?
    Dynamic Software Development
    www.activeminds.ca

  3. #3
    WebProWorld MVP kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun's Avatar
    Join Date
    May 2005
    Location
    Norway
    Posts
    7,704

    Re: PHP Problem

    Do you mean transclusion?

    <simplelink href="MySite.xml" show="embed" actuate="onload" />

    Combining XLink with XML's fragment identifier XPointer or XPath, you can embed fragments of an XML or XHTML document into another.

    It should be possible serverside with PHP and one of it's many XML parsers where DOM is the most advanced.

    Note: XHTML documents can be regarded as XML documents in this respect.

  4. #4
    Senior Member seiretto is an unknown quantity at this point seiretto's Avatar
    Join Date
    Nov 2006
    Posts
    162

    Re: PHP Problem

    Hi Andrew,

    You can do that via a cron job to fire a PHP script which POSTs variables to your website.

    If you do not have access to cron on your server, or find cron too technical try this free PHP scheduler:
    phpJobScheduler - scheduling PHP scripts to run at set intervals your replacement for cron jobs

    Hope that helps

    Dave Walker
    Experienced UK website host hosting sites for over a decade; Need to host mutliple domains and websites check out our Reseller hosting or try our Fully managed servers

  5. #5

    Re: PHP Problem

    To clarify want i am trying to do, i am trying to send data to an external webserver using the command fsockopen. I have a form submit example below but i do not know want data is actually sent from this page as i want to build the output from this page into a string so i can send using the fsockopen command.

    <form method="post" action="Example Web Page">
    <P>Username:<br>
    <INPUT name="Username" type="text"></P>
    <P>Password:<br>
    <INPUT name="Password" type="password"></P>
    <P>Account:<br>
    <INPUT name="Account" type="text"></P>
    <P>Sender :<br>
    <INPUT name="Originator" type="text"></P>
    <P>Recipient:<br>
    <INPUT name="Recipient" type="text"></P>
    <P>Message:<br>
    <input type="submit" value="Send">
    </form>

    Essentially i need to know the output from this form/submit so i can send the same data to a webserver via the fsockopen and fputs commands.

    Cheers

    Andrew

  6. #6
    Senior Member seiretto is an unknown quantity at this point seiretto's Avatar
    Join Date
    Nov 2006
    Posts
    162

    Re: PHP Problem

    There are loads of examples here:
    PHP: fsockopen - Manual

    Do not forget that on some hosts PHP fsockopen is disabled.
    In that case use:
    PHP: CURL, Client URL Library Functions - Manual
    Experienced UK website host hosting sites for over a decade; Need to host mutliple domains and websites check out our Reseller hosting or try our Fully managed servers

  7. #7
    WebProWorld MVP kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun's Avatar
    Join Date
    May 2005
    Location
    Norway
    Posts
    7,704

    Re: PHP Problem

    Quote Originally Posted by apwade View Post
    Essentially i need to know the output from this form/submit so i can send the same data to a webserver via the fsockopen and fputs commands.
    Need to know the output before submitting the form? If yes, isn't that a typical AJAX solution?

  8. #8
    Moderator wige has a reputation beyond repute wige has a reputation beyond repute wige has a reputation beyond repute wige has a reputation beyond repute wige has a reputation beyond repute wige has a reputation beyond repute wige has a reputation beyond repute wige has a reputation beyond repute wige has a reputation beyond repute wige has a reputation beyond repute wige has a reputation beyond repute wige's Avatar
    Join Date
    Jun 2006
    Posts
    3,136

    Re: PHP Problem

    If you just need to know what the request looks like so you can imitate it, well, there are a few different methods. The easiest is for Firefox users. There is an add-on called "Live HTTP Headers". Install the Addon, go to view, Live HTTP Headers. Then, fill out and submit the form. In the sidebar you will see the raw headers from your browser and the raw server response.

    If you do not use Firefox, or if you need more than just the headers, you can also use a caching proxy such as ParosProxy, which is used by hackers to manipulate queries as they are being sent. This will also allow you to easily test your various commands and see how the server reacts to your program.
    The best way to learn anything, is to question everything.
    WigeDev - Freelance web and software development

  9. #9
    WebProWorld MVP kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun has a reputation beyond repute kgun's Avatar
    Join Date
    May 2005
    Location
    Norway
    Posts
    7,704

    Re: PHP Problem

    A very good principle is to start making a site function well in the most used web browser.

    Fx now beats IE 6 and IE 7 individually, but not together.

    Here is a related thread of user statistics.

  10. #10
    Junior Member letraspedia is an unknown quantity at this point
    Join Date
    Nov 2007
    Posts
    6

    Re: PHP Problem

    i'll use a temporary database, load it and empty it when you consider

+ Reply to Thread
Page 1 of 2 1 2 LastLast

Similar Threads

  1. Another IE/CSS div problem I am sure someone here can fix.
    By MeanSEO in forum Graphics & Design Discussion Forum
    Replies: 19
    Last Post: 07-27-2006, 10:29 PM
  2. USB problem
    By jazzyjoe in forum The Castle Breakroom (General: Any Topic)
    Replies: 0
    Last Post: 07-26-2006, 06:23 PM
  3. What's the Problem?
    By WPW_Feedbot in forum Graphics & Design Discussion Forum
    Replies: 0
    Last Post: 03-08-2005, 06:39 PM
  4. CSS Problem
    By MrLeN in forum Web Programming Discussion Forum
    Replies: 8
    Last Post: 01-06-2004, 01:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts