Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About mouseywings

  • Rank
  1. Well right now in my method, I'm grabbing ALL results (from a cache) and then paginating those results. If I cache during the pull, wouldn't I have to do like Page 1 cache, Page 2 cache and end up storing like 50 cache results per topic if it were to hit 50 pages? That would be an insane amount of caches per topic when I could just do one. That's why I was trying to keep it that way. I just dislike how I have to flush the entire cache and recache the entire topic posts if just one post was edited or liked.
  2. I'm using Laravel for the get_posts() so I'm not sure if you could follow along. I'm storing all of these in a cache file (.txt), not a session.
  3. Ok so this is how my collection looks when pulling from the database: http://pastebin.com/xrdGr4bU array (size=43) 0 => array (size= 'id' => int 1 'topic_id' => int 1 'user_id' => int 3 'body' => string '<p>Right after this I will change my permissions and see if I can only reply and not create!</p>' (length=96) 'hidden' => int 0 'likes' => int 1 'created_at' => string '2015-04-08 13:00:34' (length=19) 'updated_at' => string '2015-04-19 16:34:06' (length=19) 1 => array (size= 'id' => int 2 'topic_id' => int 1 'user_id' => int 3 'body' => string '<p>Seeing if I can reply!</p>' (length=29) 'hidden' => int 0 'likes' => int 0 'created_at' => string '2015-04-08 14:08:40' (length=19) 'updated_at' => string '2015-04-19 16:34:08' (length=19) 2 => array (size= 'id' => int 3 'topic_id' => int 1 'user_id' => int 3 'body' => string '<p></p> <p>Testing reply as an artist! <br /></p>' (length=53) 'hidden' => int 0 'likes' => int 1 'created_at' => string '2015-04-09 14:06:46' (length=19) 'updated_at' => string '2015-04-19 16:34:13' (length=19) 3 => array (size= 'id' => int 4 'topic_id' => int 1 'user_id' => int 3 'body' => string '<p>Testing a new comment!</p>' (length=29) 'hidden' => int 0 'likes' => int 0 'created_at' => string '2015-04-15 14:53:05' (length=19) 'updated_at' => string '2015-04-15 14:53:05' (length=19) ................. However when it gets to be over 100 items long.. I'm trying to make it so if I make an edit to ID 5, I can JUST make an edit to that one and re-cache it without having to flush all those items out of the cache and then regrab them.. because that will get pretty hectic I think especially if they are edited like every 2 minutes or whatever. Is there a way to make the array INDEX the value of the post ID? Or would I have to loop through them after grabbing them to do so? I just want to be able to make it like: $data = $this->getPosts( $id ); // This will grab that array that you see above $data[$id]->body = $newBody; // And then code to recache the data (overwrite the cache key with the new data) Thanks for any help!
  4. I'm trying to do my research, but I can't see if cURL allows you to access that domain without them changing their headers and accepting our domain to talk to theirs. I didn't know if you knew if you could do it without them having to issue something.. or if there was a nice tutorial on how to go about doing this.
  5. Will CURL allow me to hit their webpage without them having to set out any headers?
  6. Don't you have to add that to the domain you are trying to reach? It's apart of their domain. I would never be able to get them to look into the code or whatever because it's a huge company.
  7. The thing is is that they aren't going to add headers on their side just for our website.. I looked into that, but both parties need to be in communication.
  8. I want to know how to hit a webpage that is not on your domain. I am doing an AJAX request right now, but receiving the following error in my console: The site I'm trying to hit does this weird cookie thing. I already spoke with their web administrator and he said the first time they access that site, it sets the cookie so they have to refresh in order to see if they can bypass a webpage they are trying to access.. I'm not sure if there is anyway to go about doing this since I can't go the AJAX route. But I don't have the capability of refreshing the user once they go on that page since it's not under my server or whatever. The only thing I could think of was AJAX which is not an option now. <?php include('scripts/config.php'); //Declare Variables $filter = new Filter(); $byPasscode = $filter->getBypassCode(); $openDns = "https://bpb.opendns.com/a/" . $_GET['url']; echo 'Redirecting...'; ?> <html> <head></head> <body> <form method="post" name="bypassForm" id="bypassForm" action="<?php echo $openDns ?>" style="display:none"> <input type="text" size="15" name="textBypassCode" id="textBypassCode" autocomplete="off" value="<?php echo $byPasscode; ?>" /> <input type="password" size="15" name="passwordBypassCode" id="passwordBypassCode" style="display:none;" value="<?php echo $byPasscode; ?>" /> <input type="hidden" name="code" id="bypassCode" value="<?php echo $byPasscode; ?>" /> <input type="submit" value="Continue" /> </form> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script type="text/javascript"> //setTimeout(function(){ var textBypassCode = $('#textBypassCode').val(); var passwordBypassCode = $('#passwordBypassCode').val(); var bypassCode = $('#bypassCode').val(); $.ajax({ type: 'POST', url: $('#bypassForm').attr('action'), data: { textBypassCode: textBypassCode, passwordBypassCode: passwordBypassCode, bypassCode: bypassCode } }) .done(function(data) { //$('#bypassForm').submit(); }); //}, 3000); </script> </body> </html> Up above you can see my code. Thanks for any other options that you may think of.
  • 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.