Wild1145
Club 4000 Member
Inactive Player & Inactive Senior Admin
Posts: 10,414
| Likes: 9,680
|
Post by Wild1145 on Dec 27, 2012 22:13:24 GMT
This is more for madgeek but others could be able to help, I am using some code that madgeek sent:
<?php header('Content-Type: text/yaml'); header("Cache-Control: no-cache, must-revalidate"); header("Expires: Thu, 01 Jan 2020 00:00:01 GMT"); header("Access-Control-Allow-Origin: *"); $file_name = 'permban.yml'; $file_path = 'plugins/TotalFreedomMod/'; $bhttpd_url = 'http://<The Server IP>:<And the port for bukkitHTTPD>/'; $bhttpd_password = ''; $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL=>sprintf("%s%s%s/?password=%s", $bhttpd_url, $file_path, $file_name, $bhttpd_password), CURLOPT_TIMEOUT=>5.0 )); curl_exec($ch); curl_close($ch); ?>
Ive obviously removed the actual ip and port, now im not sure if i have not done something else, we don't currently use a password because of the way my botch log viewer works, any help would be appreciated as i keep getting this error when i save as a .html
sprintf("%s%s%s/?password=%s", $bhttpd_url, $file_path, $file_name, $bhttpd_password), CURLOPT_TIMEOUT=>5.0 )); curl_exec($ch); curl_close($ch); ?>
And if i save it as a .php it just shows the code, What am i doing wrong?
Thanks
Wild
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 27, 2012 22:15:42 GMT
I dunno
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 27, 2012 22:16:25 GMT
These codes mean nothing to me..
|
|
Wild1145
Club 4000 Member
Inactive Player & Inactive Senior Admin
Posts: 10,414
| Likes: 9,680
|
Post by Wild1145 on Dec 27, 2012 22:16:47 GMT
The other issue is that it is showing the source in the webpage, i am looking to make it almpst identical to the live permban list madgeek uses here.
|
|
Wild1145
Club 4000 Member
Inactive Player & Inactive Senior Admin
Posts: 10,414
| Likes: 9,680
|
Post by Wild1145 on Dec 27, 2012 22:17:26 GMT
These codes mean nothing to me.. Dosent really mean alot to me eather, just know what im looking at tbh
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 27, 2012 22:20:00 GMT
so what happens when you use a html page and implement the PHP Into it?
|
|
Wild1145
Club 4000 Member
Inactive Player & Inactive Senior Admin
Posts: 10,414
| Likes: 9,680
|
Post by Wild1145 on Dec 27, 2012 22:22:05 GMT
Madgeek the wounderfull genius has told me how to solve it!
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 27, 2012 22:25:55 GMT
whats wrong with it? or is It what I said?
|
|
Wild1145
Club 4000 Member
Inactive Player & Inactive Senior Admin
Posts: 10,414
| Likes: 9,680
|
Post by Wild1145 on Dec 27, 2012 22:27:14 GMT
Il explain on skype, i CBA to type it out
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 27, 2012 22:29:13 GMT
ok you will explain tomorrow then, since Im on my phone.
|
|
Wild1145
Club 4000 Member
Inactive Player & Inactive Senior Admin
Posts: 10,414
| Likes: 9,680
|
Post by Wild1145 on Dec 27, 2012 22:30:21 GMT
yea, sure
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 27, 2012 22:32:20 GMT
If you're saving it as a .php file and it just shows the code, that means you don't have PHP installed on your web server. What is your web host?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 27, 2012 22:33:14 GMT
And why did you change the Expires header?
|
|
Wild1145
Club 4000 Member
Inactive Player & Inactive Senior Admin
Posts: 10,414
| Likes: 9,680
|
Post by Wild1145 on Dec 27, 2012 22:33:19 GMT
000webhost
|
|
Wild1145
Club 4000 Member
Inactive Player & Inactive Senior Admin
Posts: 10,414
| Likes: 9,680
|
Post by Wild1145 on Dec 27, 2012 22:34:09 GMT
And why did you change the Expires header? That was me testing to see if that was why it didnt work, when i uploaded i undid all the changes i did and just reverted back to the original code with the changes for the actual ip and port
|
|