Volledige versie bekijken : Runnen niet lokaal PHP script
h0lland
%Europe/Berlin %468 %2005, 12:14
Ik ben bezig met een script dat statistieken van bezoekers moet bijhouden op een aantal flash sites van anderen (die dus niet op mijn server staan). Voor deze statistieken heb ik een centraal PHP script geschreven dat op mijn eigen server staat.
Om het script aan te roepen kan ik de functie loadVariables() (zonder return waarden) niet gebruiken omdat het php script niet in hetzelfde domein staan, en de functie getURL niet omdat ik niet wil dat het php-bestand in de browser getoond wordt.
is er een mogelijkheid om het php-script toch uit te voeren zonder hem weer te geven?
Jeroen
acroes
%Europe/Berlin %493 %2005, 12:50
Met LoadVars() kun je ook php scripts op andere servers aanroepen, en je krijgt return waarden en het wordt niet getoond.
Ook met xml is het mogelijk, maar dan moet er een crossdomain.xml bestand op de externe servers staan.
AC
h0lland
%Europe/Berlin %500 %2005, 13:00
quote van flash support:
LoadVars.load()
In SWF files running in a version of the player earlier than Flash Player 7, url must be in the same superdomain as the SWF file that is issuing this call. A superdomain is derived by removing the left-most component of a file’s URL. For example, a SWF file at www.someDomain.com can load data from sources at store.someDomain.com because both files are in the same superdomain named someDomain.com.
In SWF files of any version running in Flash Player 7 or later, url must be in exactly the same domain (see "Flash Player security features" in Using ActionScript in Flash). For example, a SWF file at www.someDomain.com can load data only from sources that are also at www.someDomain.com. If you want to load data from a different domain, you can place a cross-domain policy file on the server hosting the SWF file. For more information, see "About allowing cross-domain data loading" in Using ActionScript in Flash.
Volgens de flash support is het niet mogelijk met loadVars() want of je krijgt en respons van de browser (= data in een window, _self, _blank, etc) of je mag het niet cross-domain gebruiken (zie hierboven).\
De tweede optie lijkt echter goed bruikbaar. Kun je misschien kort uitleggen hoe het werkt? alvast bedankt daarvoor!
Jeroen
De Kale
%Europe/Berlin %361 %2005, 09:41
gebruik LoadVars() met de methode sendAndLoad() in combinatie met een crossdomain.xml op jouw server met de juiste domeinen die mogen connecten.
no problem, is allemaal goed mogelijk
h0lland
%Europe/Berlin %485 %2005, 12:39
ok tis opgelost! bedankt!
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.