Jump to content

shanejeffery86

Members
  • Posts

    83
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

shanejeffery86's Achievements

Member

Member (2/5)

0

Reputation

  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.
×
×
  • 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.