Jump to content

shanejeffery86

Members
  • Posts

    83
  • Joined

  • Last visited

    Never

Everything posted by shanejeffery86

  1. NOTE: The PHP code below is coming from the same index.php file that the 2nd header is redirecting too. Hey all. I have done a ton of research and troubleshooting on my end, so let me tell you first off what is not happening. 1. There is nothing been echo'd prior to the header. 2. The PHP tags have no space before/after them. 3. The syntax for the header parameters are correct. Here is the code block: if($_POST['register'] == "Pay & Register"){ include("../statreport/paid-content.php"); $creatorID = findBoxCreatorID($_POST['box_id']); $creatorEmail = findCreatorEmail($creatorID); $returnURL = 'http://' . $_SERVER['SERVER_NAME'] . "/"; $paypal_url = 'https://www.paypal.com/cgi-bin/webscr'; $payment_data = array( 'cmd' => '_xclick', 'business' => $creatorEmail, 'item_name' => 'ContentBoxer Box Purchase - (User ID: ' . $user_id . ')', 'item_number' => $_POST['box_id'], 'amount' => 0.01, //$_POST['boxPrice'], 'no_shipping' => 1, 'return' => $returnURL, 'shipping' => 0, 'tax' => 0 ); $payment_data_2 = http_build_query($payment_data); header("Location: $paypal_url?$payment_data_2"); } else { setcookie("ebook_uid",$user_id,mktime() + 31556926, "$box_path"); setcookie("ebook_chk",$user_code,mktime() + 31556926, "$box_path"); //need to check that this still works...also, need to make it work when users log in and don't have basic required questions in their profile. if (!$displayallquestions) { header("location:index.php?e=".$_POST["box_id"]."&open=1"); //for 2-part registration, go to the next part. } else { $_POST["submit_questions"] = true; //for 1-part registration, set this so that we can move on to the custom questions. } } Here is the thing though. If the code executes down to header("location:index.php?e=".$_POST["box_id"]."&open=1");, this header runs perfectly fine. However, if it tries to do the external header for the Paypal link, then nothing happens. If I put in an echo right before the header redirect for Paypal, the echo gets run. Also, if I take the output of the paypal URL and paste it into the URL bar, the URL works just as it is supposed to. So, there is no issue with the paypal URL. Something is going on with the header() function in regards to redirecting to an external site. Any ideas? As I think this may be mod_rewrite based, I am going to include the htaccess file as well. Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^contentboxer.com [nc] rewriterule ^(.*)$ http://www.contentboxer.com/$1 [r=301,nc] RewriteRule ^[0-9]+/group/([_A-Za-z0-9-]+)/box/([0-9]+)/? /shelf/index.php?s=$1&e=$2 RewriteRule ^[0-9]+/group/([_A-Za-z0-9-]+)/?$ /shelf/index.php?s=$1 RewriteRule ^[0-9]+/mp/([_A-Za-z0-9-]+)/box/([0-9]+)/? /mp/index.php?s=$1&e=$2 RewriteRule ^[0-9]+/embed/([_A-Za-z0-9-]+)/([0-9]+)/? /shelf/index.php?s=$1&e=$2 RewriteRule ^[0-9]+/embed/([_A-Za-z0-9-]+)/?$ /shelf/index.php?s=$1 RewriteRule ^[0-9]+/embed/([_A-Za-z0-9-]+)/([0-9]+)/params(.*)/? /shelf/index.php?s=$1&e=$2&param=$3 RewriteRule ^[0-9]+/embed/([_A-Za-z0-9-]+)/params(.*)/? /shelf/index.php?s=$1&param=$2 RewriteRule ^[0-9]+/([_A-Za-z0-9-]+)/([0-9]+)/? /shelf/index.php?s=$1&e=$2 RewriteRule ^[0-9]+/([_A-Za-z0-9-]+)/?$ /shelf/index.php?s=$1 RewriteRule ^rss/[0-9]+/?([_A-Za-z0-9-]?)/?([0-9]?)/?([_A-Za-z0-9-]?)/ /rss/rss.php
  2. Good evening. I am trying to work with a page that is written in XHTML -- http://us.battle.net/wow/en/character/bleeding-hollow/chewables/advanced What I am trying to do is pull the entire page and put it into something that I can pull data out of. I thought of pulling the webpage via a CURL and the converting the XHTML to an array with something like this: function & xmlToArray($xmlData, $includeTopTag = false, $lowerCaseTags = true){ $xmlArray = array(); $parser = xml_parser_create(); xml_parse_into_struct($parser, $xmlData, $vals, $index); xml_parser_free($parser); $temp = $depth = array(); foreach ($vals as $value) { switch ($value['type']) { case 'open': case 'complete': array_push($depth, $value['tag']); $p = join('::', $depth); if ($lowerCaseTags) { $p = strtolower($p); if (is_array($value['attributes'])) $value['attributes'] = array_change_key_case($value['attributes']); } $data = ( isset($value['attributes']) ? array($value['attributes']) : array()); $data = ( trim($value['value']) ? array_merge($data, array($value['value'])) : $data); if (isset($temp[$p])) $temp[$p] = array_merge($temp[$p], $data); else $temp[$p] = $data; if ($value['type']=='complete') array_pop($depth); break; case 'close': array_pop($depth); break; } } if (!$includeTopTag) unset($temp["page"]); foreach ($temp as $key => $value) { if (count($value)==1) { $value = reset($value); } $levels = explode('::', $key); $num_levels = count($levels); if ($num_levels==1) { $xmlArray[$levels[0]] = $value; } else { $pointer = &$xmlArray; for ($i=0; $i<$num_levels; $i++) { if ( !isset( $pointer[$levels[$i]] ) ) { $pointer[$levels[$i]] = array(); } $pointer = &$pointer[$levels[$i]]; } $pointer = $value; } } return ($includeTopTag ? $xmlArray : reset($xmlArray)); } This, however, is geared for parsing XML and not XHTML. Any advice on how to work through the XHTML and put the data is something like an array in other to pull data out of something that has some structure? I know about XPath, but the code needs to be XML in order for that to work (at least that is my understanding). If there is a way to use XPath with XHTML, please let me know. Thanks.
  3. Hey all. I had to move my forum from http://www.maskedcrusader.com to http://www.maskedcrusader.com/wow-account-trading-forum/ and I was wondering if there is anything I can do about the indexed links in search engines. I want to redirect all links with anything that has index.php, showthread.php, member.php, register.php, profile.php, and showpost.php in the URL prior to being rewritten to the new root for the forum. Any idea how this could be done or if there is a better way to do this? Thanks!
  4. Hey all. I am adding text to a textArea via Javascript in Chrome (doing it a totally different way in Firefox/IE as Chrome does not support contentWindows). Here is my code: document.getElementById("vB_Editor_001_textarea").value += '<font color="white"><b>' + numberLabel + ':</b> ' + armory + '</font><br/>'; This HTML is getting put directly into the textArea without being parsed. How can I make it parse into regular text with the HTML markup when it hits the textArea? Thanks!
  5. Here is what my httpd.conf file looks like as well: <VirtualHost 205.186.162.177:80> DocumentRoot /home/maskedcrusader ServerName maskedcrusader.com ServerAlias www.maskedcrusader.com </VirtualHost> <VirtualHost 205.186.162.177:80> DocumentRoot /home/maskedarmory ServerName maskedarmory.com ServerAlias www.maskedarmory.com </VirtualHost> Everything was working fine until I upgraded Masked Crusader from vB3 to vB4.
  6. I own multiple sites and they all run on the same server. http://www.maskedcrusader.com is my vB4 site that I just upgraded today and http://www.maskedarmory.com is my other site. When you hit Masked Armory though, Masked Crusader is picking up and forcing a redirect. What the heck is going on and how do I stop it? Any ideas on how to troubleshoot this issue would be great as well.
  7. I have been doing mod_rewrite for a bit now and heck if I can figure out what is going wrong. I am just trying to rewrite 3 VERY basic URLs. http://www.khaccounts.net/index.php -- to -- http://www.khaccounts.net/buy-wow-account/ http://www.khaccounts.net/sell.php -- to -- http://www.khaccounts.net/sell-wow-account/ http://www.khaccounts.net/about.php -- to -- http://www.khaccounts.net/about-khaccountsnet/ I was under the impression that the following would work: RewriteEngine On RewriteRule /buy-wow-account/ /index.php [L] RewriteRule /sell-wow-account/ /sell.php [L] RewriteRule /about-khaccountsnet/ /about.php [L] What am I doing wrong? The mod_rewrite module is enabled at the server level. Thanks!
  8. Hey all. I have a code-source that have distributed using the Ioncube encryption which requires that the user's server has IonLoader installed. A lot of people are coming back with installation problems and what not and are not able to get the code source to execute. I am wondering if there is another encryption that I can use that will not require people to have these loaders installed. Is there any kind of loader already in all distributions of Linux that I could work off of with a certain encryption program? Let me know if this question is a bit vague or you need some clarification. Thanks!
  9. Nevermind. I have been jumping around with ISPs all day and that was the problem. All sorted now
  10. Hey all. I previously had thePlanet hosting. I removed all of the zone files associated with my domain in their account management. I then went to GoDaddy (where I bought my domains) and changed the name servers to those for my new hosting provider (mediaTemple). About 10 hours ago, the DNS swapped over to the hosting on mediaTemple. About 15 minutes later, it changed back to thePlanet hosting. Then it swapped back to mediaTemple. Now, once again, it has switched back to thePlanet. I cannot figure out what the hell is going and it is really starting to irritate me. Any ideas?
  11. Well, good God almighty. I figured it out. I went ahead and picked my own location for the virtual host file and made it the httpd.conf file in the Apache2 directory. Once I did that, I restarted the server. Got a Internal 500 Error. Then went to my error log to find that I had an invalid command 'RewriteEngine', which was there because I did not have mod_rewrite installed. It all works now Thanks for your guidance thorpe.
  12. It is simply looking for everything in the var/www folder: [Wed Jul 28 07:05:02 2010] [error] [client 61.69.168.46] File does not exist: /var/www/wow-armory-profile-611.html, referer: http://vbforums.mmobay.net/wow-usa-accounts-auctions-buy-sell/393025-80-warrior-fury-arms-pvp-5-6k-6k-gs-spectral-tiger-500-obo.html [Wed Jul 28 07:05:59 2010] [error] [client 61.69.168.46] File does not exist: /var/www/wow-armory-profile-611.html, referer: http://vbforums.mmobay.net/wow-usa-accounts-auctions-buy-sell/393025-80-warrior-fury-arms-pvp-5-6k-6k-gs-spectral-tiger-500-obo.html [Wed Jul 28 07:13:49 2010] [error] [client 64.83.202.180] File does not exist: /var/www/wow-armory-profile-388.html, referer: http://vbforums.mmobay.net/wow-usa-accounts-auctions-buy-sell/390694-80-shaman-7k-achieves-realm-first-title-%24175-great-vanity.html That is my Apache2 error log is showing.
  13. Gotcha. How can I do this myself then? How can I just set up the virtual hosts without needing the panels? Just a link to a tutorial would be great. Thanks.
  14. That is the only one at this point. I am just baffled as to what is going on. Any recommendations as to another web administration platform for Ubuntu 10.04 LTS that is free that you have success with?
  15. Well, the etc/apache2/httpd.conf has nothing in it. Could that be an issue? When you set up a virtual server, it gives you the option between creating a virtual host file or putting it in your httpd file. The etc/apache2/apache2.conf has "Include /etc/apache2/sites-enabled/" at the very end of it.
  16. Hello thorpe. Yes there is. There is one in the sites-enabled and then the sites-available as well. The sites-enabled maskedarmory.com.conf has a little link icon on the top of it within Zend Studio. Obviously, I have restarted apache since I made the virtual host changes. It just still wants to pull from the var/www document root. Thanks.
  17. Hey all. I am running Ubuntu 10.04 and the newest version of Wemin. Per the tutorials I have found, I have created the Virtual Host via Webmin and it created a file in the following location :: /etc/apache2/sites-available/maskedarmory.com.conf The directives inside read as follows: DocumentRoot "/home/maskedarmory" ServerName maskedarmory.com <Directory "/home/maskedarmory"> allow from all Options +Indexes </Directory> ServerAlias *.maskedarmory.com Now, whenever I hit http://www.maskedarmory.com, it is pulling up my blank index.html page that is located in my var/www folder. I cannot figure out why it is not pulling from the directory that I have specified above in the new Virtual Host. If anyone can shed some light on the issue, it would be greatly appreciated. Thanks.
  18. Hey all. I am a PHP guru and have never really touched on the client side before. Therefore, AJAX baffles the hell out of me. I am just trying to get my feet off of the ground here so that I have some idea of how things operate. Here is what I am attempting to do: - User inputs a number into a textbox with the name "profileAmount" - User clicks the button 'Generate' - AJAX sees the number and for each number increment (1,2,3,4,5,etc), it will create a new fieldset of textboxes (about 4-5 textboxes per number increment) - Once the user enters in the data into those textboxes, they press Submit. - On submit, a PHP script is going to be hit FOR EACH FIELDSET and the script will echo out a response which AJAX needs to listen to and put into a new variable array. - We then need to echo out the data in the new variable array for each fieldset I think that is as clear as I can make it. If you have any questions or concerns, please let me know. Thanks in advance!
  19. Hey all. I have just written a very sought after PHP class and I do not want people pawning off my work as their own. I want people to have to register on my forum in order to be able to receive a key. With this key, they have to enter in the class file, and then somehow I need to validate the key. I am thinking of putting a validation function in the class and it hits an API that I create that responds back with whether or not the key is valid and whether or not the host machine is the one that the key is registered to. Does that sound like it would work? Any steps I could be missing? Thanks, Shane
  20. Thank you guys all so much for the kind words. I just got finished last night with rewriting the Gearscore addon for web use (LUA -> PHP). It was no easy feat. Now, when you create a profile, your gearscore is calculated and put on the frontpage of your armory. No other anonymous armory has this solution. Updated Armory Links With Gearscore Calculation: http://www.maskedarmory.com/wow-armory-profile-287.html http://www.maskedarmory.com/wow-armory-profile-291.html http://www.maskedarmory.com/wow-armory-profile-292.html @shortysbest -- I wanted to keep things consistent with the red text and the red in the logo. The green would have just thrown it off. I do see what you are saying in that it could be construed as the options are currently turned on and the red X could mean that you are turning them off, when you are actually turning them on. I will see if I get any complaints about that and then look into changing it if need be. very nicely done, The look and feel of the site is nice. Small thing i noticed however that bothers people like me, since i am one to be picky and all, lol, but that being that when you click on a checkbox, rather than a red X being placed in it, perhaps a nice green checkmark? therefore meaning you want that, making more since then having a red x which normally means you don't want that. Just something small and hardly worth complaining about
  21. Example: RewriteRule ^buy/$ /buy.php [L] The links to buy.php should show up as buy/, but it does not. Still shows buy.php.
  22. Hey there again Cags. The rewrite is not happening whatsoever. So, I have something wrong with my rules. My understanding is that you have it backwards. I am trying to get it to recognize http://domain/character.php?acc_id=20 and rewrite it to http://domain/buy-wow-account/account/20/.
  23. Hey all. I am just stumped and cannot figure out what I am doing wrong. I thought I understood the basics of mod_rewrite and rewrite rules as I did a pretty bangup job on another site. But, now, I cannot get the rules to work on a new site. Here is what I have going on in my .htaccess: Options +FollowSymLinks RewriteEngine On RewriteRule ^buy-wow-account/account/([0-9]+)/$ /character.php?acc_id=$1 [R] RewriteRule ^buy$ /buy.php [R] RewriteRule ^sell$ /sell.php [R] RewriteRule ^feedback$ /feedback.php [R] RewriteRule ^aboutus$ /about.php [R,L] I have checked with my host and mod_rewrite is installed on the server and properly configured. So, that is not the problem. Any ideas on what the heck I am doing wrong? Thanks!
  24. Hey all. World of Warcraft has a very large user base and a lot of people end up selling their accounts at one point or another. I have created Masked Armory so that people have a very streamlined system by which to show off their character without the risk of being caught by Blizzard (the creator of the game). This site piggybacks on the creation of Masked Crusader (http://www.maskedcrusader.com) which is an buying, selling, and trading community for games like World of Warcraft, Runescape, Aion, and much more. Here is a link to the main part of the site: MaskedArmory.com Links to example live armories: Anonymous Level 80 Human Mage Profile | MaskedArmory.com Anonymous Level 80 Gnome Warrior Profile | MaskedArmory.com Anonymous Level 80 Tauren Druid Profile | MaskedArmory.com Any feedback would be greatly appreciated! Thanks!
×
×
  • 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.