Jump to content

alphazulu

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

alphazulu's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hey neat never seen that function before, playing with it now thank you
  2. Ok, So, This has been on my nerves for a few days now The point of this is not too actually write to a file, but while I am testing I have it just writing to a file, later on it will edit a Wordpress page, and some other stuff First it reads from a file and gets a list of other files, next it opens a file, stores it in an array and should append it to a file, then repeat, adding the contents of each file to the end of the file. However, all it is doing is taking the contents of the first file and putting that intp the file. Here is the code, what am I missing? I feel like its right in front of me.. $master = "master.txt"; $mlines = count(file($master)); $mlines = $mlines - 1; $cat = array(); $files = array(); $ah = fopen($master, 'r'); $temp = fgets($ah); $cat = explode("=", $temp); fclose($ah); for($b = 0; $b <= $mlines; $b++){ $fh = fopen($cat[$b], 'r'); $lines = count(file($cat[$b])); $lines = $lines - 1; for($c = 0; $c <= $lines; $c++){ $files[$c] = fgets($fh); lp_post($files[$c]); } fclose($fh); } function lp_post($files){ $text = "text.txt"; $h = fopen($text, 'a'); fwrite($h, $files); fclose($h); }
  3. hmm jquery, will fix that. it references an external .css, which is actually made by the php file when the script is run, which works just fine I will work on reforming it, but this is ultimately going to work on any page where the correct call to the .php file is made. I will let you know if i can get it to work
  4. No change This is odd to me, I did a lot of small scale testing, but when it comes to the final it outputs this only
  5. Ok Now I see what is happening, but still at a loss for some reason. Could be because I have been working on this for 10 hours today, or maybe I don't know what to do here. it is simply printing the JS as text, I can post this since its nothing this is what firebug shows me <html> <head> <script src="http://www.lightspeedmedia.net/test/contentlocker.php" type="text/javascript"> function setupgateway(){ var Left = $(window).width() /2; Left = Left - $('#gatewaydiv').width()/2; var Top = $(window).height() /2; Top = Top - $('#gatewaydiv').height()/2; $('#gatewaydiv').css('top', Top+'px').css('left', Left+'px').css('display', 'inline'); $('#gatewayDimmer').width($('html').width()); $('#gatewayDimmer').height($('html').height()); $('#gatewayDimmer').css('display','block');}function removegateway(){ $('#gatewaydiv').css('display', 'none'); $('#gatewayDimmer').css('display','none');}document.write("<meta http-equiv="refresh" content="5 ">);document.write("<link rel="stylesheet" type="text/css" href="style.css" />");document.write("<div id="gatewayDimmer"></div>");document.write("<div id="gatewaydiv">");document.write("<ul id="OfferList">");document.write("<h1>You Must Complete An Offer To Unlock Page </h1>");document.write("<span id="gatewayMessage">Files Locked </span>");document.write("<br /><br />");document.write("<li><center><a href="www.website.com " class="offerlink" target="blank">Click Here Man </a></center></li>");document.write("<li><center><a href="www.website.com " class="offerlink" target="blank">Click Here </a></center></li>");document.write("<li><center><a href="www.website.com " class="offerlink" target="blank">Click Here </a></center></li>");document.write("<li><center><a href="www.website.com " class="offerlink" target="blank">Click Here </a></center></li>");document.write("</ul><br /><br /><center><h3><b>This page will automatically refresh once the offer is finished </b></h3></center></div>");$(document).ready(function() { setupgateway(); }); </script> </head> <body> </html>
  6. never used it before, gonna check it out now
  7. Hello, I am having some issues with a project I am working on. I am calling a php file on another server using <script type="text/javascript" src="http://www.website.com/test/file.php"></script> I have the correct type header in my php file and the php outputs JS. example echo "document.write(\"some stuff\");"; that kind of thing happens alot I also have it outputting a few JS functions, example echo 'function dostuff(){ stuff }'; the problem I am having is when I add the JS call to the page that calls the php it does nothing I am using document.ready I am not really sure where to go from here, I know php well enough to do anything I need but I do not know JS at all I can not post the actual source code, I know that would be much easier to troubleshoot this but this is something I just can not do. Also this needs to be done this way, I need to call to php files on another server so they can do some stuff and then use JS to change some things on another page on another server. This is a content locker, a lot like CPALead and things like that. What am I missing? Any help is greatly appreciated
  8. This is what I have done in past $ref = $_SERVER['HTTP_REFERER']; $ref = explode("/", $ref); echo "$ref[2]"; if referer was http://www.website.com/folder then that code will output www.website.com on another note it also gives you folder names
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.