Jump to content

YourNameHere

Members
  • Posts

    199
  • Joined

  • Last visited

Everything posted by YourNameHere

  1. Also, I am no longer getting the failed to connect to the host error.
  2. They didnt specify if that was the reason it was failing, but that they "could not open inbound ports for shared hosting packages". After speaking with someone else on the subject that has had to do the exact thing that I am attempting to connect to, they explained that they had to request that hostgator open that port and they stopped receiving that same error (error 7: Could not connect to host) Update: After going back to them explaining that it was an outbound connection and with non-malicious intent, they opened it without hesitation.
  3. That is what they are telling me. I believe they have most ports blocked unless you request them to be opened. I am trying to use port 12046. Just for clarity, that's true to it being an outbound connection?
  4. I need to ask my host to open a port for outbound connections via cURL. THey are telling me that they cannot open inbound ports for my hosting package type. I have been told that curl or file_get_contents makes an outbound connection. I can't seem to verify this through the docs unless I am missing something. Can anyone verify before I go back to my host and make a fool of myself?
  5. You can check the $_SERVER['HTTP_REFERER'] variable and make sure that it comes from paypals website. That is just one way to do it. I'm sure there are more.
  6. $text = $_POST['txttext']; $text = nl2br($text); $text = mysql_real_escape_string($text); That is all that is necessary. nl2br() needs to be done before you place it in the DB. then you can just echo the text.
  7. I have a function that is supposed to look into a string from a database and replace all "{Gallery:[0-9]}" with a php function that will print a button to the page that opens an image gallery. Now, I can get the button on the page and make it work with the javascript gallery. However, it places the html for the button before the text string that it searched though. For example: String from DB: "Please check out this {gallery:9}." Should print : "Please check out this [Gallery 9 Button]." Instead, it prints: "[Gallery 9 Button] Please check out this" Here is my code that I have. function print_button($id) { echo '<span class="gallery_btn ui-state-default ui-corner-all" id="openerForGallery'.$id.'">Gallery</span>'; } // print_button() takes 1 param: id of the gallery, then echos the nessesary javascript and then a button // for opening that gallery. function get_galleries_from_string($str) { $str = preg_replace('~\{gallery:([0-9]+)\}~ies', 'print_button($1);', $str); return $str; } I have simplified the functions for debugging purposes. And it works just without the fluff of the javascript functions. If you know of a better way to do this, I am all ears.
  8. Ok, maybe "software" is misleading. It's a pre-build website. Similar to WordPress. When the "software" is installed, I would like it to send data back to my server about the domain it's published on. So really, it wouldnt be used a lot since it only sends the data once during the lifetime of the "software".
  9. No, I'm just asking for what technology is available to do it. I don't want to track tons of information. Just what domains actually use the software. So, yes, how to encode it and send back to the server and I am aware of json_encode()/decode() just never had a use for it. Should I take your response as you are for json?
  10. Hi, I am writing a piece of software that I would like to track who is using it. What I need is something similar to google tracking. Do I need to use jsonp? Or is there another way to avoid that, I would need to learn how to use json to do that. Basically, I want the script to post to my server to a php page that will insert all the gathered info into a database on my server. I know how to do the inserting and whatnot but how to deliver the info is the question.
  11. This is a broad area of expertise. There are many things you must educate yourself on. Collision detection algorithms be one of the important ones. It's a very interesting topic and I wish you luck in your endeavor. I would say that you should research them as they will help you immensely while creating a game.
  12. Everything in the exec' function (echo or otherwise) gets placed above the entire string when echoed. is there a workaround for this? the gallery() function requires in a template.php that prints the javascript image gallery to the page and a button that opens the gallery. but the button is above the string on the page. Is this an expected side effect of the require?
  13. Here is a real simple answer. I make no guarantees that this is the best way. With the API, it allows you to upload directly to youtube from a form on your site. When they do that, you can capture the url (from the youtube API) and save it to a database. Then you can use that url from the database to play it on whatever page you want. You can gather whatever info you want and save it to YOUR database. Like a unique name/description/username (of up-loader) etc.
  14. It will be hard to do so without giving a long-winded lesson on Wordpress. I will give a site that has excellent tutorials on everything wordpress. The get_links() function (of wordpress) prints out (to the page) all your links (that you set up in your admin area) in <li><a href="?">?</a></li> format... This can be added to your tabs. To do so, I'm afraid you will need to do some research. It is out of the scope of this post to explain it all. So go through these series of tutorials and you should have little problem implementing what I am saying. http://www.wpdesigner.com/2007/02/19/so-you-want-to-create-wordpress-themes-huh/ This guy explains it the best i've seen. Sorry I cant help more but hopefully it sets you on your way to being able to figure it out.
  15. How did you figure it out? What was your solution?
  16. I think you can just add you get_links("title=") function to that and it will do the same as the get_pages() function. that way you can add links too and the tabs will open. However, if these are jQuery tabs with a remote url, it will break your tabs if you put in an absolute remote url as the href attr. (A local url will be called via AJAX, and will .load() into the tab div.)
  17. Unfortunately, that isn't the way to ask for help. You might not get a response. we need to know what you tried and failed at, so we have a starting point to help you. Edit: and I think what you mean is that the API allows you to upload to YOUTUBE from your website. not to your website from YouTube
  18. I'll try that thanks. and you knowi normally would stand up to apple, but the site owner is on a iPad.... kinda hard to do in this case That's understandable. I hope DomPDF is what you're looking for. no flash and it's great. I believe it just uses PHPs native PDF functionality to convert an html page to PDF.
  19. Thank you, that worked! Now to figure out how to extend that with the gallery: part being variable. ie. [a-z]/ $1. You rock!
  20. Look into DomPDF. I've only played with it and got it's very basic features working but it's pretty awesome. With it, you can have the option to view live on the page or download it. With PHPs streaming capabilities you can even save the pdf to the server for faster viewing/downloading later by multiple users. edit: Unless it will break the application, I say stand up to apple and make it flash-based. If we are undeterred by them, they cant bully us or Adobe. f--k Apple http://www.digitaljunkies.ca/dompdf/
  21. Hi, I am trying to take a string from a database and replace everything within {} with code... similar to how posting in a forum works. so say I have "...Lorem ipsom {gallery:1} sit imet..." it will take that string (from a DB) and replace "{gallery:1}" with "<?php gallery('1'); ?>". How can this be done? Or is there keywords I can search on to find the answer? Thank you in advance.
  22. I have the need for a script that will "bounce" and email to a set number of users. I was told that this is possible with PHP but am not sure how to implement something like this. Here's a scenario: I have an email, "all_users@example.com". When an email is sent to this address, "it" checks for all users and then sends that same email to all users. Now if I have a role called "Super User", and an email address called super_users@example.com, it would do the same as above except would send to only the addresses with role, "Super User". I have no clue where to start researching this and if it's even possible.
  23. Is the file you want to transfer/copy actually on your original server? I mean has it been created already by the time this script executes? Can you navigate to it using the URL bar of your browser? Otherwise, it just sounds like it cant find the actual file (the .txt) on your server. Try echoing the the $txt1 variable and see if you get an absolute or relative path to the file. If it is just "asdas.txt". that is wrong. unless that file is in the same directory as this script. Otherwise, it must be"../asdas.txt" or "www.example.com/directory/asdas.txt".
×
×
  • 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.