Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-31-2007, 06:52 AM
WebProWorld Member
 

Join Date: May 2007
Location: Grimsargh, UK
Posts: 37
apwade RepRank 0
Default 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
__________________
Discount shopping vouchers
Reply With Quote
  #2 (permalink)  
Old 10-31-2007, 08:36 AM
DaveSawers's Avatar
WebProWorld Veteran
 

Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 389
DaveSawers RepRank 1
Default 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
Reply With Quote
  #3 (permalink)  
Old 10-31-2007, 09:39 AM
kgun's Avatar
WebProWorld 1,000+ Club
 

Join Date: May 2005
Location: Norway
Posts: 5,402
kgun RepRank 3kgun RepRank 3kgun RepRank 3
Default 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.

Last edited by kgun : 10-31-2007 at 09:51 AM.
Reply With Quote
  #4 (permalink)  
Old 10-31-2007, 03:41 PM
seiretto's Avatar
WebProWorld Pro
 

Join Date: Nov 2006
Location: Huddersfield, Yorkshire, UK
Posts: 131
seiretto RepRank 0
Default 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 UK managed servers
Reply With Quote
  #5 (permalink)  
Old 11-01-2007, 05:11 AM
WebProWorld Member
 

Join Date: May 2007
Location: Grimsargh, UK
Posts: 37
apwade RepRank 0
Default 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
__________________
Discount shopping vouchers
Reply With Quote
  #6 (permalink)  
Old 11-01-2007, 05:16 AM
seiretto's Avatar
WebProWorld Pro
 

Join Date: Nov 2006
Location: Huddersfield, Yorkshire, UK
Posts: 131
seiretto RepRank 0
Default 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 UK managed servers
Reply With Quote
  #7 (permalink)  
Old 11-01-2007, 07:58 AM
kgun's Avatar
WebProWorld 1,000+ Club
 

Join Date: May 2005
Location: Norway
Posts: 5,402
kgun RepRank 3kgun RepRank 3kgun RepRank 3
Default 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?
Reply With Quote
  #8 (permalink)  
Old 11-01-2007, 11:09 AM
wige's Avatar
Moderator
WebProWorld Moderator
 

Join Date: Jun 2006
Location: United States
Posts: 1,840
wige RepRank 4wige RepRank 4wige RepRank 4wige RepRank 4
Default 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.
Reply With Quote
  #9 (permalink)  
Old 11-01-2007, 11:16 AM
kgun's Avatar
WebProWorld 1,000+ Club
 

Join Date: May 2005
Location: Norway
Posts: 5,402
kgun RepRank 3kgun RepRank 3kgun RepRank 3
Default 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.
Reply With Quote
  #10 (permalink)  
Old 11-05-2007, 03:25 AM
WebProWorld New Member
 

Join Date: Nov 2007
Posts: 6
letraspedia RepRank 0
Default Re: PHP Problem

i'll use a temporary database, load it and empty it when you consider
__________________
ww.letraspedia.com
artistas,letras
Reply With Quote
  #11 (permalink)  
Old 11-06-2007, 03:50 AM
WebProWorld Member
 

Join Date: May 2007
Location: Grimsargh, UK
Posts: 37
apwade RepRank 0
Default Re: PHP Problem

Thanks for all the help and possible solutions, i will look into the possible solution using firefox to see the responses.

Cheers Andrew
__________________
Discount shopping vouchers
Reply With Quote
  #12 (permalink)  
Old 11-27-2007, 05:01 PM
WebProWorld Member
 

Join Date: Nov 2006
Location: Seattle
Posts: 59
shannonlp RepRank 0
Default Re: PHP Problem

This sounds like a spider that is needing to input form data. If thats the case check out this book:

WEBBOTS, SPIDERS and SCREEN SCRAPERS by Michael Schrenk

The book has a utility for doing what you are talking about. It allows you to see the form variables for the form.
__________________
Web Designer and Custom Spider Creator
eCommerce and shopping cart information
Reply With Quote
  #13 (permalink)  
Old 12-07-2007, 06:04 AM
WebProWorld New Member
 

Join Date: Dec 2007
Posts: 5
anadirsitio RepRank 0
Default Re: PHP Problem

The following example is good:
<INPUT name="Password" type="password"></P>
<P>Account:<br>


So just pay attention and work to it.
__________________
http://www.anadir-sitio.com - Aņadir sitio web
internet medios negocios
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Css problem subho Graphics & Design Discussion Forum 2 09-22-2005 10:26 AM
SSL problem... montytx eCommerce Discussion Forum 1 02-20-2005 10:30 PM
Another WPW problem minstrel WebProWorld: Guidelines/Announcements/Suggestions 3 11-24-2004 04:24 PM
CSS / IE problem... Orion Web Programming Discussion Forum 2 06-21-2004 05:02 PM


Search Engine Optimization by vBSEO 3.2.0