How to enable external host File POST

Category: How To

wizetracker
Asked:
2013-08-23 2:10 am EST

Hits: 392
I have a PHP script to upload files with POST method, everytime I use a local request it will upload the file successfully but when I try to do it from an external host it gives me an error

"Access Denied"

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

johnpaulb-imhs1
Staff
10,994 Points
2013-08-23 10:10 am EST
Hello wizetracker,

Thank you for your question. I'm not exactly sure what you are trying to do, but you must enter the URL of the site you want to POST to.

We are happy to help, but will need a little more information to provide a more detailed answer. Do you have a link to the Access Denied error?

Where are you connecting "from" and "to"?

If you have any further questions, feel free to post them below.
Thank you,

-John-Paul

You must login before you can post a comment about this answer.

It is easy to understand, let me provide you an example:

Local request:
http://wizetracker.com/servicios/uploadhtml.php

External Request:
to simulate an external host use the same html code in the previous example and place it in this html test bed:
http://www.jmarshall.com/easy/html/testbed.html

html code to use is:

<html>
<body>
<form action="checkinpicture.php" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file"><br>
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
wizetracker
11 Points
2013-08-24 3:15 am EST
Wow, I found the issue with the test bed, I just changed the action and added the full URL:

<html>
<body>
<form action="http://www.wizetracker.com/servicios/checkinpicture.php" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file"><br>
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>

And it Worked, wow to many hours without sleep I am sorry
wizetracker
11 Points
2013-08-24 3:32 am EST
Hello wizetracker,

Thank you for updating us, and let us know. I'm glad you were able to get the script working.

If you have any further questions, feel free to post them below.
Thank you,

-John-Paul
johnpaulb-imhs1
10,994 Points
Staff
2013-08-26 9:53 am EST
Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!