Jump to content

ciber

Members
  • Posts

    102
  • Joined

  • Last visited

    Never

Everything posted by ciber

  1. Hi, I am currently using this javascript to show and hide my comment area on my site <script type="text/javascript"> <!-- function toggle_visibility(id) { var e = document.getElementById(id); if(e.style.display == 'block') e.style.display = 'none'; else e.style.display = 'block'; } //--> </script> But I want to add an additional feature into it. When someone clicks the comment link on the frontpage, to goto the comment area I want to comment area to be shown ie: the link will be http://mysite.com/blog/entry.html#comments but if they visit the content, without the #comment, then it must keep it hidden. Is this possible? Thanks
  2. hi I have been battling to get my tables content to align at the top, I have tried valign="top" and it did not work. Here is the link: CLICK HERE if you look, between the header and the description there is a big gap - how can I get the description to move up? Thanks
  3. Hi, I got a watermarking script which rewrites the images to watermark.php?url=fff/xxx.jpg (Transparent Redirect) The watermark.php file is in my images directory (mysite.com/images/watermark.php) Problem is I only really want my images to be watermarked for the /images/gallery/, /images/news/ and sites that hotlink my images, then it must watermark regardless. Any help will be appreciated. Regards
  4. sigh ... nevermind, function I was supposed to use was right, stupid me made a typo .. no wonder it was not working
  5. ?? dude look closer, i ain't just changing the the / to %, if you notice '%2F' is the hex representation of '/'
  6. I am wanting to convert a URL to a specific format, what PHP function would I use.
  7. I am currently using this $doc->load($url) to fetch an rss feed. If a feed takes long than 20 seconds to download, I wish to terminate it and proceed to the next, is there any way of terminating this?? Reference $doc = new DOMDocument();
  8. hmm, didn't think of unsetting the variables, thats a good idea! Thanks
  9. I have created a website, which runs a small php script using curl every 5 minutes. These are the steps the script uses: 1. Access list of RSS feeds from DB loop { 2. Download RSS Feed loop { 3. Does RSS entry exist in the database ? Yes - Next Entry No - Add to Database } } My problem is, is that there are a number of entries. I run a script every minute, which divides the list into 5 categories. Ie: I run 10:00 - RSS Feeds 1-15 10:01 - Rss Feeds 16 - 30 10:02 - Rss Feeds 31 - ... etc etc etc Things is, the script is eating up the systems load, and causing it to peak as high as 40 or 50. Is there anyway to optimize this, so that it reduces the server load?? An idea I originally had was to use the generated time on the rss feeds, problem is, cause some of them are generated on the fly, it wont work. Thanks
  10. urgh, just leave it, i give up on this idea
  11. i've used about 10 different scripts, I just can't get them to work, its not like Im lazy to do this, its just nothing bloody works when I use it. I can't even get this damn thing to work, and its 2 lines of code: http://lipidity.com/fancy-form/#support
  12. i dont have a javascript nothing works, I dont even know where to start anymore
  13. Hi, I have tried every javascript possible, but I just cant get this damn thing to work. Basically I need it, that when the checkbox "controller" is checked, all other checkboxes (sources) become disabled and clear if they were checked. <input type="checkbox" name="controller" /> Include all sources<br><br> <?php echo "<table width=\"100%\" align=\"center\" cellpadding=3 cellspacing=0> \n"; $even = 1; $style = "sectiontablentry2"; while ($row = mysql_fetch_assoc($result)){ if ($even == 1) echo "<tr class=\"$style\">\n"; echo "<td>"; $name = $row['name']; echo "<input type=\"checkbox\" value=\"$name\" id=\"sources\" onClick=\"FancyForm.update(element.getParent())\" />$name<br>"; .......... etc .......
  14. can't get it to work either
  15. hi, it doesnt want to work I even tried it on this tester site, and nothing.?! http://www.fileformat.info/tool/regex.htm
  16. I been battling to find a regex statement to do the following: I need to be able to verify an email, but it must only work if the domain matches @mydomain.co.za some of the emails use a . eg, name.surname@mydomain.co.za and some use a 9 digit id alias 123456789@mydomain.co.za anyone got any suggestions?
  17. I am busy creating a function to grab data from YouTube's API, but the one thing for the title is not grabbing any data. I am using a preg_match_all, and I think there is something wrong with my pattern: $pattern = '<title type=\'text\'>(.*)</title>'; if(preg_match_all($pattern, $data, $title)) {$title = $title[1][0];} can anyone see anything wrong?
  18. I have created a small component, but I used a lot of general PHP now I want to make it MVC, how can I do this? Anyone know of a book or tutorial I can refer to?
  19. no ... i only started to learn this about 3 months ago, and only in the last week have I really started to go into it a lot. I am using the "dummy" way. :| still using the manual on php.net quite a bit. The way you have changed this now, is much simpler! Thanks!!
  20. i have a function which request data from the YouTube API - here is my code, perhaps this can explain why function stats($id,$type) { $data = getdata($id); if ($type == '1') { preg_match_all( "<yt:statistics viewCount='(.*?)' favoriteCount='(.*?)'/>", $data, $stat); $final = $stat[1][0]; } if ($type == '2') { preg_match_all( "<yt:statistics viewCount='(.*?)' favoriteCount='(.*?)'/>", $data, $stat); $final = $stat[2][0]; } return $final; } you see, my function does 2 things, so if I need to request it again, it will then download the data again or will it hold it .. sorry im still new to this...
  21. Is it possible to store information for the duration of the function, so that the script doesn't need to download an an API's XML everytime it is requesting something?
  22. I use a php file to display images, if it is linked from another site. What I want to know, is if someone links to an image <a href> it will show the php file (this works already) but what I want, is if they link to the image using a <img> is it possible to redirect to an image then so I can put a hotlinking message into a jpg/gif file so it will show on their site instead of not loading anything.
×
×
  • 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.