Like SystemiConnectFri 15 Oct 2021, 04:50
Auto Save MessagesLGforumFri 26 Feb 2021, 13:31
New tutorial questionTheCrowMon 15 Feb 2021, 08:12
Support iOS Emojis (and other platforms)LGforumSun 14 Feb 2021, 01:25
LGforum (2806)
Send a .php file from my server into my forum? Vote_lcapSend a .php file from my server into my forum? Voting_barSend a .php file from my server into my forum? Vote_rcap 
Mr.Easybb (1587)
Send a .php file from my server into my forum? Vote_lcapSend a .php file from my server into my forum? Voting_barSend a .php file from my server into my forum? Vote_rcap 
Bloodbath (745)
Send a .php file from my server into my forum? Vote_lcapSend a .php file from my server into my forum? Voting_barSend a .php file from my server into my forum? Vote_rcap 
Rukiafan (533)
Send a .php file from my server into my forum? Vote_lcapSend a .php file from my server into my forum? Voting_barSend a .php file from my server into my forum? Vote_rcap 
Dom (513)
Send a .php file from my server into my forum? Vote_lcapSend a .php file from my server into my forum? Voting_barSend a .php file from my server into my forum? Vote_rcap 
puppycheese (446)
Send a .php file from my server into my forum? Vote_lcapSend a .php file from my server into my forum? Voting_barSend a .php file from my server into my forum? Vote_rcap 
pedro (330)
Send a .php file from my server into my forum? Vote_lcapSend a .php file from my server into my forum? Voting_barSend a .php file from my server into my forum? Vote_rcap 
Neymar (301)
Send a .php file from my server into my forum? Vote_lcapSend a .php file from my server into my forum? Voting_barSend a .php file from my server into my forum? Vote_rcap 
Hitsu (281)
Send a .php file from my server into my forum? Vote_lcapSend a .php file from my server into my forum? Voting_barSend a .php file from my server into my forum? Vote_rcap 
Flora (275)
Send a .php file from my server into my forum? Vote_lcapSend a .php file from my server into my forum? Voting_barSend a .php file from my server into my forum? Vote_rcap 


Send a .php file from my server into my forum?

gillgill
Status : Syntax highlighter's colors are nice.

Posts : 78
Join date : 2014-04-05
Sun 06 Apr 2014, 00:06
Hello,

I want to send a .php file from my server into my forum. I'll already use this code on my .htaccess file :

Code:
<?php
header('Content-Description: File Transfer');
header('Content-Type: .php');
header('Content-Disposition: attachment; filename=userdata.php');
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize("userdata.php"));
ob_clean();
flush();
readfile("userdata.php");
exit;
?>

But no work. Can I have some other script?

Thanks.
Mr.EasybbMr.Easybb
Status : Love this site, that's why I'm back each day again... lol Samantha's co-owner now. Well deserved!

Posts : 1587
Join date : 2013-01-04
Sun 06 Apr 2014, 01:17
You are trying to get information from a php file? Why not use ajax? And that php code doesn't go inside the .htaccess file. Also if you are trying to get userdata stored in an off site database you can connect with ajax. LG may have some more words for you since he does this with the Avatars so
gillgill
Status : Syntax highlighter's colors are nice.

Posts : 78
Join date : 2014-04-05
Sun 06 Apr 2014, 03:37
The PHP code? So, where I put it? I have to create a new file and name it "sendthedata.php" and paste the whole PHP code in it? Or I should paste it on "userdata.php" script?
AJAX? What method? POST method or GET method?

Thanks.

BTW, I got this script when I try to search in Avacweb :

[ic]$.get("http://your-website.com/your/server/side/script.php");[/ic]

Can I? Or I should make a detailed GET AJAX method?
Mr.EasybbMr.Easybb
Status : Love this site, that's why I'm back each day again... lol Samantha's co-owner now. Well deserved!

Posts : 1587
Join date : 2013-01-04
Mon 07 Apr 2014, 00:06
.htaccess looks different than that. You use that in a PHP file such as script.php and then your script fills in your mySQL db or MS SQL (WINDOWS BASED SERVER THOUGH MOST ARE mySQL) and then you'd use a get to GET that information, So you need to use both POST and GET
gillgill
Status : Syntax highlighter's colors are nice.

Posts : 78
Join date : 2014-04-05
Mon 07 Apr 2014, 11:23
So I make a new file with name "blablabla.php", yeah I already understand this.
Can you explain me the meaning of script fills in your mySQL db or MS SQL? I don't really understand mySQL lol.
I'll use the GET AJAX Method in my forum right? And POST AJAX Method in my server, am I right?
gillgill
Status : Syntax highlighter's colors are nice.

Posts : 78
Join date : 2014-04-05
Tue 08 Apr 2014, 07:02
Bump can someone help me?
HitsuHitsu
Status : Finished on working fmAPI.

Posts : 281
Join date : 2013-09-09
Age : 25
Location : Indonesia
Tue 09 Sep 2014, 12:47
You can use CORS for that. So first, you make a .php file on your external server, then you use CORS on your script. That's the only way I know, so yeah. But you can use AJAX too if you doesn't really understands or doesn't really sure about how to use CORS.
S.T CodingS.T Coding
Status : No status yet...

Posts : 11
Join date : 2014-04-21
Age : 29
Location : Romania > Hall of city
Tue 09 Sep 2014, 18:25
try Smile here is your solutions
http://api.jquery.com/jquery.get/
gillgill
Status : Syntax highlighter's colors are nice.

Posts : 78
Join date : 2014-04-05
Mon 22 Dec 2014, 13:45
Thank you very much! Smile I'll did it. I set some jQuery.get method and set the [ic]if($_SERVER['HTTP_ORIGIN'] == "http://myforum.forumotion.com") { header('Access-Control-Allow-Origin: http://myforum.forumotion.com'); }[/ic] and that's it! Smile thank you very much.
avatarGuest
Thu 05 May 2016, 05:59
Solved and archived.
Sponsored content