Jump to content
xisto Community
Sign in to follow this  
demolaynyc

Need An Alternative To $http_post_data For PHP4

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 Xisto's apache program has no problems with this but HOSTWAY.com does. I don't know if It's because of the version difference (Xisto=v4.3? and Hostway=4.0)

Now I know the Actionscript works because When i tried this same flash guestbook in Xisto and 100WEBSPACE both they work. However, in HOSTWAY, it doesn't work.



Share this post


Link to post
Share on other sites

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://forums.xisto.com/no_longer_exists/

Share this post


Link to post
Share on other sites

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... :P

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.