php

The most strange error in the world (PHP $_GET, $_POST, $_REQUEST and ajax)

I hope you'll able to help me. I'm fed up of trying things without any solution and php it's just driving me crazy. I'm looking for help because I have a html document where I use ajax thanks to jquery api. Inside this file, in a js function I have: $.ajax({ type: "GET", url: "c.php", data: "dia="+matriz[0]+"&mes="+matriz[1]+"...

How do i create an OpenID login form

i am wanting to create an open id login, i am wondering if i use one of the classes from Creating an OpenID Login widget, like openid selector library or openid real selector. btw, is realselector newer/better, since its a rewrite of openid selector library is there a getting started tutorial? i see that in both i can easily login using...

Connecting to SQL Server very slow.

I have a standard php app that uses SQL Server as the back-end database. There is a serious delay in response for each page I access. This is my development server, so its not an issue with the live setup, but it is really annoying for working on the system. I have a 5 - 8 second delay on each page. I am running SqlServer 2000 Develop...

Which web technology to learn for an experienced C++ developer?

Friends, I've got some exp in c++ and now kind of starting my way to J2EE (to survive:))). Meanwhile, I've got a plan to venture in to a web portal my own. But with very little experience in web technology, I'd need to start from scratch. I'm little confused on which way to go and I'm here. PHP, Python or JSP, considering the fact tha...

Flags not displaying using PHP

Hello, I am trying to display a country flag based on the user's IP address. Previously, I had it working fine, but I think I accidentally did something wrong. After hours of debugging, I can't seem to find what's causing the error. It's not throwing any errors, but its simply not displaying any flags or any of the 'echo' statements. Doe...

How do I integrate amazon results in my classifieds website?

I have a classifieds website (with geoclassifieds basic) and would like to integrate amazon results into the search results. What's a simple way to to do this? ...

Cityname to geographical coordinates PHP script???

Hello guys, i need to develop a php script who ask for a city name and return a simple echo with the geographical coordinates of the city. Input data: Cityname OR Cityname, Country I know there is a free database called GeoNames were you can download a database who contains this information, but i really dont know how to export this da...

URL GET request formatted as a deep link

I'm wondering how data passed to the URL can be "camouflaged" as a deep link. Here is an example of a site that does this: http://www.conradit.no/ I actually developed that site, but paths have been changed later. So I have seen sites that does this even without referencing the index page (e.g. www.sometime.com/get/data/camouflaged) I...

Warning and Fatal error calling require_once()

I want to fetch div element from other website . on which iam having my profile, i have tried using this code. require_once('../simple_html_dom.php'); $html=file_get_html('http://www.example.com'); $ret=$html->find("div[id=frame-gallery]"); $ret=array_shift($ret); echo($ret); but this code is giving errors Warning: require_onc...

I want to write multiple images to an odt file either in python or php

I want to write multiple image files to a odt file. I will be specifying a dir and the script will take it from there thru a loop. But where do i start? I have never done anything like this before! I found this python code, which can convert html 2 python... so we can parse an html first and then call this one. But there is no reference...

PHP eval and capturing errors (as much as possible)

Disclaimer; I'm fully aware of the pitfalls and "evils" of eval, including but not limited to: performance issues, security, portability etc. The problem Reading the PHP manual on eval... eval() returns NULL unless return is called in the evaluated code, in which case the value passed to return is returned. If there is a par...

Preventing Spam

How do you stop bots on a page which is accessible to registered users only? 90% page is accessed by real users and 10% are bot. I do not want to put captcha or verification method on the page because I know that my users wont like this and they lazy also. Please share your ideas Edit I want to make this question more clear Registr...

Problem with jQuery load() and Facebook XFBML

Hi, The situation I open a layer (jQueryUI) like this. $("#dialog").load('userinfo.html #layer').dialog('open'); userinfo.html displays the photo and the name of a facebook user. <html xmlns:fb="http://www.facebook.com/2008/fbml"&gt; <...some code...> <div id="layer"> <script type="text/javascript"> $(functi...

confusing about simpleXML

I have a xml file: <kemo> <cities> <area>area1</area > <city>city1</city> <status>Lipsum1</status> </cities> <cities> <area>area1</area > <city>city2</city> <status>Lipsum2</status> </cities> <cities> <area >area2</area > <city>city3</city> <status>Lipsum3</status> </cities> <cities> <area >a...

When hiring php/mysql developers, what should they know?

I read over this post. If I plan to hire php developers to help develop my site, how do I distinguish between the great and "bad" programmers? I plan to hire on craigslist, and I'm sure there are tons of bad coders(such as clueless about security, bad design, no OOP, no framework, code all jumbo) but there are also those with amazing s...

What are the risks of PHP sessions?

So everyone says that sessions have security risks, I want to know what kind of risks are these? What can hackers do with sessions? This is not about knowing how to avoid attacks, I want to know how hackers are doing it, and what are they doing. I talk about PHP SESSIONS. ...

resize() not working using Image manipulation class

Hi all, I’ve been reading the docs and trying everything to make thumbs out of uploaded images but I can’t seem to find the problem. Images are uploaded and saved correctly but thumbs are not, it fails with no error output. This is the code I’m using: $data = $this->upload->data(); $config_image['image_library'] = 'gd'; $config_image[...

How do I make an image an anchor in CodeIgniter?

I have read other threads on how to do this and they do not work for me. Can someone tell me how to make an image a anchor in CI? I have tried these: <li><?php echo anchor("Home",img("../application/images/Home_up.png")); ?></li> and <li><?php echo anchor("Home",img("src"=>"../application/images/Home_up.png")); ?></li> ...

PHP5 doesn't work an a custom DocumentRoot

Hi, I am currently struggling with the following problem. I have successfully installed Apache2 and PHP5. And it works until I change the DocumentRoot of the Apache2 to something different than /var/www. I want to set the DocumentRoot to /home//wwwroot, but after doing this all php pages are just white. (no download message or sth.) H...

Syntax Highlighter putting new lines randomly (or maybe after every symbol).

I am using a simple implementation of Syntax Highlighter for a blog written in CodeIgniter. Here is the link http://code.angad.sg/index.php/blog/test Not sure why is this happening. I am not pasting the source code for the file; you can do a Ctrl+U on the link. Thanks :) ...