Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Need An Alternative To $http_post_data For PHP4
demolaynyc
post Oct 20 2006, 04:18 PM
Post #1


Premium Member
Group Icon

Group: Members
Posts: 330
Joined: 2-February 06
Member No.: 11,040



Hi, my client's host site currently hosts just 4.0. I tried using the file_get_contents("php://input") and $HTTML_post_data php file to save the XML file from Flash but when loaded, it returns nothing. I need hlep
Go to the top of the page
 
+Quote Post
vujsa
post Oct 20 2006, 05:25 PM
Post #2


Absolute Newbie
Group Icon

Group: Admin
Posts: 887
Joined: 20-February 05
From: Indianapolis, Indiana, USA (Midwest)
Member No.: 2,714



I would love to help you out here but I have no idea what your problem is.

Please explain exactly what it is that you are trying to get, where you are trying to get it from, where you are trying to put it, and what information the user is supplying.

Telling us that the method that you are using doesn't work doesn't help us help you. It could be a problem of you using the wrong method in which case we really need to find the right method.

The problem could be elsewhere in your script as well. Right now I just don't have enough information to assist you.

vujsa
Go to the top of the page
 
+Quote Post
demolaynyc
post Oct 20 2006, 07:44 PM
Post #3


Premium Member
Group Icon

Group: Members
Posts: 330
Joined: 2-February 06
Member No.: 11,040



Alright so my client wants me to create a Flash guestbook. The user would be asked to enter in their name, email and their comment and that would be sendAndLoaded through GBaddPost.php which would obtain the xml file passed through by the flash program via POST method.

The PHP file would then open up the guestbook.xml file, write in the new guestbook.xml content using the obtained xml info and then close the file. The method I'm currently using to obtain that data is via file_get_contents("php://input"); Now ASTAHOST's apache program has no problems with this but HOSTWAY.com does. I don't know if It's because of the version difference (Astahost=v4.3? and Hostway=4.0)

Now I know the Actionscript works because When i tried this same flash guestbook in ASTAHOST and 100WEBSPACE both they work. However, in HOSTWAY, it doesn't work.
Go to the top of the page
 
+Quote Post
minnieadkins
post Oct 22 2006, 05:02 PM
Post #4


Premium Member
Group Icon

Group: Members
Posts: 292
Joined: 15-December 04
Member No.: 1,768



Apparently the function you're using wasn't added until PHP 4.3

Check php.net and search for the function and you should get some info on it that might help.

I also found this article that could be of some use, since you already have your script written, you might be able to use this technique.

Hope this helps. Good luck to you. Maybe some of the advanced users here at the forums will have more to offer you. I haven't gotten too far in manipulating files with php. Still on my TODO list.

http://www.php-mag.net/magphpde/magphpde_a...,nodeid,21.html
Go to the top of the page
 
+Quote Post
Hercco
post Oct 24 2006, 12:58 PM
Post #5


Super Member
Group Icon

Group: Members
Posts: 595
Joined: 4-September 04
Member No.: 228



Yes, file_get_contents() was added to PHP 4.3.

Needless to say, what you need to do is write the part in the old fashioned way where you read the data to a string. Basically implementing file_get_contents yourself.


By the wasy, if your luck is anything like mine, you implement the function today and tomorrow they'll upgrade to PHP 4.3... tongue.gif
Go to the top of the page
 
+Quote Post
mastercomputers
post Oct 25 2006, 06:40 AM
Post #6


BUG.SWAT.PATROL
Group Icon

Group: Members
Posts: 626
Joined: 1-September 04
From: Auckland, New Zealand
Member No.: 27



How about shedding some code, it'd be easier to understand what you're trying.

Since I see you trying to use php://input I guess what you're wanting to do is grab the $HTTP_RAW_POST_DATA (so try this instead) other than that, what you are trying to do requires PHP 4.30.

Cheers,

MC
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Php, Sql Lite: Storing Session's Data?(1)
  2. Displaying Data From Mysql?(2)
  3. Help With Multi Tier Mysql Application Over Net(6)
  4. Php/mysql Data Display(3)
  5. Possible To Do?(7)
  6. [PHP + MySQL] Encrypting Data(9)
  7. Reading Data From Sessions(2)
  8. How To Embed Ram File Produced By Http Header(2)
  9. Storing Data Into Xml With A Php Form(2)
  10. Data Passing - Re An Assignment For School - Please Help :)(8)
  11. Need MySQL Alternative To The Syntax "or die()"(8)
  12. Send XML Data To PHP Page(0)
  13. Proper Way To Grab User Data?(1)
  14. Retrieving Data And Displaying In Boxes(6)
  15. Sql Injection Prevention (passing Numerical Data Across Pages).(9)
  1. Getting Certain Parts Of A Record(17)
  2. Letting Users Add Mysql Data With Php(1)
  3. Reading Xml Data(2)


 



- Lo-Fi Version Time is now: 5th September 2008 - 12:53 PM