Problem Creating Requests to PhP Files Stored on Server?
Hey!
I have hosted some php files inside my public_html folder, and they simply query a database and return json results.
The php scripts work perfectly fine in the browser (by typing website.com/phpScript.php) and via CURL (in CMD prompt - windows) but when I run the php scripts via HTTP Request in C# Programming language I get error 404 (not found) or error 500 (Even though it works in the above mentioned methods).
Does anyone know what I need to configure on the file management server to allow requests from my C# applications?
I know it is not a spelling error in the URL (Copy & Paste into browser works) as well as the way I have setup the HTTP Request (I tested it with a locally hosted php script and everything worked fine until I hosted the php Script on the File Management Server).
Any Help or Guidence would be greatly appreciated!
-
Hey there! I am personally not a programmer or developer, but I'll leave this thread marked as new for a bit so others can share their ideas! 0 -
Hey there! I am personally not a programmer or developer, but I'll leave this thread marked as new for a bit so others can share their ideas!
Hey! I just finally figured it out - for anyone who has the same issue in Unity just use HttpClient class to send the HTTP requests instead of the UnityWebRequest class! Not sure if they have different headers or why this made a difference to my access to the docs but it fixed the problem.0 -
Nice! I'm glad you were able to get that working! 0
Please sign in to leave a comment.
Comments
3 comments