473,408 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

POst in a serverside way

Hi all,
I have to make a post in php but from the server (serverside).

I've though to use the system("wget ..");

but surely exist others solutions... which?

Dec 15 '05 #1
5 1288
You could use sockets to connect to the webserver. Take a look at
fsockopen.

Dec 15 '05 #2
RicercatoreSbadato wrote:
Hi all,
I have to make a post in php but from the server (serverside).

I've though to use the system("wget ..");

but surely exist others solutions... which?


Google "post2host". Functions and usernotes to refer: fsockopen,
fopen & curl.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Dec 15 '05 #3
C.
Creating your own HTTP stack is not trivial, although it is the only
way to solve certain types of problem (not this one though). Having
said that I did it and it run approximately 10x faster than starting up
an instance of the curl program (similar to wget).

The fastest and simplest solution is to use the libcurl extension.

If you need to be able to handle redirection and cookies, IIRC there is
a project on Sourceforge called snoopy which might serve you better.

HTH

C.

Dec 15 '05 #4
RicercatoreSbadato wrote:
Hi all,
I have to make a post in php but from the server (serverside).

I've though to use the system("wget ..");

but surely exist others solutions... which?


Hi,

Look up CURL at www.php.net.

CURL let you add name/value pairs and will produce a 'real post', as if
posted by a browser.

Have fun!

Regards,
Erwin Moller
Dec 15 '05 #5
Thank you! ;)

Dec 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: TG | last post by:
Dear PHP Group, I have two forms that are used to collect user information. The first one takes user inputted values such as fullname, city, address etc. I want these values to display in the...
4
by: Pavils Jurjans | last post by:
Hallo, I am working on multilingual web-application, and I have to be very sure about how the international characters are encoded and decoded in the client-server form requests. There's a...
2
by: Stephan Hauduc | last post by:
What I think is the best way for me to do what I want to do is have a text file which contains the following, the number of slides at the top, then the time lengths that each file should be...
5
by: Gary Vidal | last post by:
I have a client side Javascript which checks an OrderQuantityField against a hidden Textbox of the Minimum Order Quantity. I dont want to do validation on a postback. I would like to be able to...
4
by: Paul J. Lay | last post by:
I am sending and receiving multipart messages using the WebClient UploadData method Method=Post. Everything seems to work well except when the URL contains parameters. For example:...
3
by: Brian Henry | last post by:
I have two list boxes on my form... lstCanSend and lstRecipients... well then there are two buttons add and remove between them (your basic select and pick listing) which uses java script to move...
8
by: John Dalberg | last post by:
Hello For a single signon solution, I am putting a login form for a remote server on my own site. When the form gets posted, the asp.net creates a httpwebrequest object, does the post, gets the...
7
by: | last post by:
Hello, I would like to do the following from a asp.net button click: <form method="POST" action="https://www.1234.com/trans_center/gateway/direct.cgi"> <input type="hidden" name="Merchant"...
4
by: Ryan Knopp | last post by:
Two questions. 1) Is there a way i can determine the page was a POST or a GET w/o checking the "?" in the url? 2) Is there a way i can get the POST variables using javascript? (example: like...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.